|
[Sponsors] |
December 21, 2011, 09:23 |
Outlet boundary condition in interFoam
|
#1 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16 |
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 |
|
December 23, 2011, 14:03 |
|
#2 |
Senior Member
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24 |
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 |
|
December 30, 2011, 03:21 |
|
#3 |
Senior Member
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 17 |
pressureInletOutletVelocity?
|
|
January 1, 2012, 10:38 |
|
#4 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16 |
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 |
|
January 3, 2012, 10:49 |
|
#5 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16 |
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 |
|
May 11, 2012, 07:10 |
|
#6 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
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?
|
|
May 12, 2012, 23:35 |
|
#7 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
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... |
|
May 13, 2012, 00:19 |
|
#8 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
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?
|
|
May 14, 2012, 09:08 |
|
#9 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
...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. |
|
May 15, 2012, 05:32 |
|
#10 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
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. |
|
May 15, 2012, 09:31 |
|
#11 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
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?
|
|
May 16, 2012, 22:59 |
|
#12 | |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Quote:
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 |
||
May 23, 2012, 07:15 |
|
#13 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
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.
|
|
June 14, 2012, 10:11 |
|
#14 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
the strange behavior vanishes when using zeroGradient for p_rgh instead. However I cant explain the coordinate-dependent behavior when using outletValue uniform 0.
|
|
April 5, 2013, 10:38 |
|
#15 |
Member
Join Date: Mar 2013
Posts: 98
Rep Power: 13 |
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 |
|
April 5, 2013, 11:10 |
|
#16 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
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)?
|
|
April 5, 2013, 11:48 |
|
#17 |
Member
Join Date: Mar 2013
Posts: 98
Rep Power: 13 |
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 |
|
April 9, 2013, 08:53 |
|
#18 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
..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.
|
|
April 9, 2013, 09:28 |
|
#19 |
Member
Join Date: Mar 2013
Posts: 98
Rep Power: 13 |
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
|
|
April 11, 2013, 11:31 |
|
#20 |
Member
nadine moussa
Join Date: Mar 2012
Posts: 30
Rep Power: 14 |
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 |
|
|
|
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 |