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 Tree10Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 16, 2014, 10:36
Default
  #41
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by vonboett View Post
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
Dear vonboett,
Thanks for your replay. In fact, I was running my case in the opposite way where I impose the inlet BC from the bottom at z=0 and flow should go out at the top where z=0.017 m. So when I shrink the domain length to half so less, liquid comes out smoothly not like when z=0.017. Any how the case now is working for the long domain when I swamped the BC upside down which I do not why???. If you have any explanation you can help me with because it is not logical... Could you please show me what was the inlet and walls BC you used for the case you ran and sent me?
best wishes,
Sandy,
sandy13 is offline   Reply With Quote

Old   October 5, 2015, 12:22
Default
  #42
Senior Member
 
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12
Saideep is on a distinguished road
Hi guys;

I presently have some sort of b.c issues that you had previously. Hope anyone can help me out.

I am using interfoam solver and trying to inject two fluids simulataneously through alternate channels from the inlet {water, oil, water, oil} and expect a mixed flow{water+oil} at the outlet boundary as shown in figure.

I fix pressure[Pa] at the inlet(x) and at the outlet(0).

For velocity i use a "zeroGradient" at outlet and "pressureInletOutletVelocity" for inlet.

When i have lower pressure injection for water relative to oil, everything seems to be fine as expected. But when i try to make all the inlet channels have the same pressure values, then
initially everything looks fine but after some time of run, i have a backward flow at one of the inlet{that is the flow is going out of the domain at the inlet} and alpha gets out of range. Also the flow at the outlet changes it direction of flow. [Can be seen in the posted data. Negative sign at inlet is flow into domain, positive sign at outlet is outflow through the domain. Above one is something at initial time and the bottom data is at a later time].

Expression totalInflow_0 : sum=-3.92639e-15
Expression totalInflow_1 : sum=-7.33046e-16
Expression totalInflow_2 : sum=-1.85515e-17
Expression totalInflow_3 : sum=-1.06606e-15
Expression inflow_0_Water : sum=-3.92639e-15
Expression inflow_1_Water : sum=0
Expression inflow_2_Water : sum=-1.85515e-17
Expression inflow_3_Water : sum=0
Expression inflow_0_Oil : sum=0
Expression inflow_1_Oil : sum=-7.33046e-16
Expression inflow_2_Oil : sum=0
Expression inflow_3_Oil : sum=-1.06606e-15
Expression outflow_0_Water : sum=2.93572e-15
Expression outflow_1_water : sum=2.28004e-16
Expression outflow_2_Water : sum=1.86927e-17
Expression outflow_3_water : sum=4.26874e-22
Expression totalOutflow_0 : sum=2.96816e-15
Expression totalOutflow_1 : sum=5.51016e-16
Expression totalOutflow_2 : sum=1.05719e-15
Expression totalOutflow_3 : sum=1.16767e-15
Courant Number mean: 0.0292251 max: 0.300384
Interface Courant Number mean: 0.0116064 max: 0.23988


---------------------------
Expression totalInflow_0 : sum=-1.11676e-13
Expression totalInflow_1 : sum=2.21668e-13
Expression totalInflow_2 : sum=-5.45042e-14
Expression totalInflow_3 : sum=-1.20261e-14
Expression inflow_0_Water : sum=-1.11676e-13
Expression inflow_1_Water : sum=0
Expression inflow_2_Water : sum=-5.45042e-14
Expression inflow_3_Water : sum=0
Expression inflow_0_Oil : sum=0
Expression inflow_1_Oil : sum=2.21668e-13
Expression inflow_2_Oil : sum=0
Expression inflow_3_Oil : sum=-1.20261e-14
Expression outflow_0_Water : sum=-1.9006e-14
Expression outflow_1_water : sum=-9.30047e-15
Expression outflow_2_Water : sum=-4.94652e-16
Expression outflow_3_water : sum=-2.04992e-19
Expression totalOutflow_0 : sum=-1.90947e-14
Expression totalOutflow_1 : sum=-1.34784e-14
Expression totalOutflow_2 : sum=-6.41545e-15
Expression totalOutflow_3 : sum=-4.47371e-15
Courant Number mean: 0.00731049 max: 0.301158
Interface Courant Number mean: 0.00405459 max: 0.195399


Though i guess symmetry of my structure{spreads out the pressure} and the viscosity values(oil>water) have a role to play in the displacement i am not able to understand why there is an outflow through the inlet with positive pressure(gradient) and inflow at the region of outlet.

Thanks;
Saideep
Attached Images
File Type: jpg problem1.jpg (23.3 KB, 93 views)
Saideep is offline   Reply With Quote

Old   October 6, 2015, 08:04
Default
  #43
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
Do you have gravity acting in -y direction? could you show the pressure distribution along a center slice cut through the domain?
vonboett is offline   Reply With Quote

Old   October 6, 2015, 14:37
Default
  #44
Senior Member
 
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12
Saideep is on a distinguished road
Hi vonboett;

Thanks for your reply.

The gravity has been turned off.

I taught rather than plots the attached pics make sense in following order. Just let me know if you find it the other way round.

I was using an injection pressure: 10000Pa {all inlets} and outlet Pressure: 0Pa.

You can notice a negative Ux that starts to occur at the 1st inlet causing an outflux. [numbering 0 to 3 from bottom to top] see fig1 and fig2 which are successive time steps data.
fig2.png fig3.png

Also attached is a plot at the outlet end where the velocities turn negative which start to cause an inflow at the outlet region[fig3].
U_xoutletend.png

Coming to pressure, it looks quite physical initially[fig4] {last time step before it starts to behave bad}:
p1.jpg
and at the time where it bursts out[fig5] In the last figure please look at the legend values.
p2.jpg

Overall it makes sense of the flow behavior but why is there a change in the direction of flow and sudden pressure burst throughout the domain?
I notice that this happens when the water injection pressure >= oil injection pressure but not the other way round.

Sorry for the long post;
Thanks;
Saideep
Saideep is offline   Reply With Quote

Old   October 7, 2015, 04:43
Default
  #45
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 17
Andrea_85 is on a distinguished road
If you have multiple fluids at the inlet i guess that setting a fixed value boundary condition for pressure in both fluids is not a good idea. The pressure inside the two fluids is, in theory, different due to capillary pressure but you are trying to fix the same value. I think this is the problem. I have observed similar behavior at the outlet when both fluids leave the domain at the same time.
I would switch to a velocity fix boundary condition and leave the pressure free to adjust depending on the fluid at the inlet. Or fix the pressure only at the inlet where you have fluid 1 (or fluid 2).

Hope this help

Andrea
Andrea_85 is offline   Reply With Quote

Old   October 7, 2015, 08:20
Default
  #46
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
what is your alpha boundary condition at the inlet and outlet? Could you take a look if you get negative concntrations or values grater 1 for alpha?

Try out
outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
for alpha1 together with a pressureInletOutletVelocity and zeroGradient for U at inlet?
vonboett is offline   Reply With Quote

Old   October 7, 2015, 10:24
Default
  #47
Senior Member
 
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12
Saideep is on a distinguished road
Thanks Andrea and vonboett;

@Andrea:
Actually i started with fixed velocity values for the inlets which is an ideal case. Due to the shape of the model{throats arent symmetric at the ends of the model} I am not able to maintain a constant pressure at inlets of specific phase injection channels{which i am interested in, to calculate the grad(P)_oil/water}, so i switched to fixed pressure boundaries. May be an alternative could be is to extend my model{i.e. include throats at the top and bottom also so that it could symmetric at all inlet channels}.

@vonboett:
I am using the following bc for alpha.
left_0
{
type fixedValue;
value uniform 1; /*phase1= water*/
}

left_1
{
type fixedValue;
value uniform 0; /*phase0 = oil*/
} /*continue to other inlets also*/
and outlet channels with zeroGradient and equilibrium contact angle over the surface of the solid.

Do you mean inletOutlet and outletInlet for U at inlet and P at oulet respectively or for alpha?

And yes once this happens nothing remains to be computed accurately in terms of volume fraction, alpha[increases every step of calculation c.a. 4000], pressure etc.

Thanks a lot Adrea and vonboett for your insight on this;
Saideep
Saideep is offline   Reply With Quote

Old   October 8, 2015, 06:38
Default
  #48
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
I am curious about what happends with pressureInletOutletVelocity for U at the outlets
and
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
for alpha at the outlets...
vonboett is offline   Reply With Quote

Old   October 12, 2015, 13:05
Smile
  #49
Senior Member
 
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12
Saideep is on a distinguished road
Hi and sorry for my late reply.

It practically made not difference.
Data written as output:

/*-ve sign is inflow into the domain*/
Expression totalInflow_0 : sum=-1.92084e-13
Expression totalInflow_1 : sum=4.19385e-13
Expression totalInflow_2 : sum=-1.78747e-13
Expression totalInflow_3 : sum=-1.6061e-14

/*+ve shall be the outflow through the outlet*/
Expression totalOutflow_0 : sum=-6.52957e-15
Expression totalOutflow_1 : sum=-1.24967e-14
Expression totalOutflow_2 : sum=-7.9281e-15
Expression totalOutflow_3 : sum=-5.53935e-15


Max(alpha1) = 176.701

I used a fixed P at inlet for water at 10500Pa and for oil at 10000 Pa.
Inlet and outlet velocities mentioned as pressureInletOutletVelocity.
Also changed the alpha outlet bc to inletOutlet{I still dont understand why you meant to use this over here but made no difference}!!

Any further ideas.
Thanks!!
Saideep

Saideep is offline   Reply With Quote

Old   October 13, 2015, 07:40
Default
  #50
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
Hi Saideep,

I work with turbulent open channel flows and there it can happen that you get some inflow at the outlet in some parts for some moment, and therefore I like to use inletOutlet for alpha to make sure that it sucks in atmospheric air and not water from the downstream. If you use
U
{ type inletOutlet
inlet value uniform (0 0 0)
value uniform (0 0 0)
}
at the outlet you should at least get rid of inflow at the outlet. Just as a test to see that everything else is right, how about specifying the inflow velocity at the inlets and use p_rgh zeroGradient at the outlet (as well as alpha zeroGradient)?

Cheers,

Albrecht
Bashar likes this.
vonboett is offline   Reply With Quote

Old   May 31, 2017, 18:40
Default
  #51
Member
 
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11
Bashar is on a distinguished road
Quote:
Originally Posted by vonboett View Post
Hi Saideep,

I work with turbulent open channel flows and there it can happen that you get some inflow at the outlet in some parts for some moment, and therefore I like to use inletOutlet for alpha to make sure that it sucks in atmospheric air and not water from the downstream.
Albrecht
Hi, Albrecht

I was trying for the past couple months to figure up how to control my surface water level , and I think I manage to do that. I am simulating flow in river past plate positioned inside the flow domain. My goal is to do LES but for know I am using RANS with interFoam with Re=50000. I got the result , however the flow fields don't looks ok, and also when I compare the results with fluent the drag signature is not correct. The openfoam results shown a constant increase in the drag coefficient! while it should be settled after awhile!

I attached the case files and a pictures of alpha and velocity field. Any advice are appreciated.

Bashar
Attached Images
File Type: jpg alpha@0sec.jpg (28.9 KB, 80 views)
File Type: jpg alpha@50sec.jpg (35.8 KB, 64 views)
File Type: jpg Velocity@0sec.jpg (29.3 KB, 60 views)
File Type: jpg velocity@50sec.jpg (40.4 KB, 99 views)
Attached Files
File Type: zip Channel_with_plate.zip (10.9 KB, 22 views)
Bashar is offline   Reply With Quote

Old   July 20, 2017, 14:31
Default
  #52
Member
 
Amir
Join Date: Jan 2017
Posts: 32
Rep Power: 9
albet is on a distinguished road
Hello foamers,
I am using OF 2.3.0 and I have a problem with BC for open-channel flow as well.
I hope somebody can help.
my geometry is a 2D channel with an inlet, outlet, top and bottom.

inlet:
p-rgh: fixedFluxPressure
U: variableHeightFlowRateInletVelocity
alpha.water: variableHeightFlowRate

bottom:
p-rgh: fixedFluxPressure
U: fixedValue (0 0 0)
alpha.water: zeroGradient

outlet, top:
P-rgh: totalPressure (po=0)
U: pressureInletOutletVelocity
alpha.water: inletOutlet (inletValue uniform 0;value uniform 0; )

in this case, the velocity of the water near the outlet increase and the water level decrease. (I think based on what I read about it in the forum the water lever should stay constant until the end!!)

on the other case,
I changed the outlet to
outlet:
p-rgh: outletInlet
U: inletOutlet
alpha.water: zeroGradient

the result is the same as the first case.

in the other case:

oulet:
p-rgh: zeroGradient
U: inletOutlet
alpha.water: zeroGradient

in this case the water level increase and the velocity decrease in outlet.

the only method I can keep the water level constant is what kflora suggested, but I am not sure that it gives the correct velocity profile. because I used very long channel but it seems that it will affect the results in some way, finally.
I am not very experienced in the simulation. I hope somebody can help.

Regards,
Amir

Last edited by albet; July 23, 2017 at 12:34.
albet 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 14:48
How to set the Heat Flux boundary condition at Outlet creddy_trddc CFX 3 September 21, 2011 08:44
outlet boundary condition for compressor modeling siamak1424 FLUENT 3 August 8, 2009 06:55
outlet boundary condition for compressor modeling siamak1424 FLUENT 0 August 6, 2009 10:41
Outlet boundary condition CN FLUENT 6 May 22, 2005 10:37


All times are GMT -4. The time now is 14:46.