CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   TwoPhaseEulerFoam and InletOutlet boundary condition (http://www.cfd-online.com/Forums/openfoam-solving/59848-twophaseeulerfoam-inletoutlet-boundary-condition.html)

hemph January 19, 2007 08:41

In my simulation I am modeling
 
In my simulation I am modeling packing/settling of particles in a 2D rectangular domain. At the outlet I want fluid to pass through, but particles to stop. This posts concerns a problem with the boundary condition for the fluid. If I set a zeroGradient B.C. for the fluid, I get problems with inflow of fluid at the outlet.

To remedy this, I applied the inletOutlet boundary condition, setting the inlet velocity to zero. This works as expected for the velocity field Ub, which is limited to zero in the influx faces.

However, the flux of the fluid phase phib is not zero in zero-velocity faces as they should be! Since Ub at the cell is reconstructed from phib (which has flux), there is a net influx. Attaching a picture of the unwanted behavior.
http://www.cfd-online.com/OpenFOAM_D...your_image.gif

Has anyone experienced this before? I see that the tutorial cases for twoPhaseEulerFoam uses inletOutlet BC, so it should be appropriate for this application. If anybody is interested I can make the case available for download.

(This question is related to a previous one about twoPhaseEulerFoam (previous post.)

hemph January 19, 2007 08:50

Oops, I got no file transfer d
 
Oops, I got no file transfer dialog from the forum software for the image. Attaching a link to the image instead.
outflow image

//Rasmus

ziad January 19, 2007 14:44

Hi Rasmus, I understand thi
 
Hi Rasmus,

I understand this is a 2D case. I wouldn't mind running it over the weekend. Would be a nice little exercise. Please post the case and don't forget any special fixes you might have added to your own version of FOAM.

Cheers,
Ziad

hemph January 22, 2007 11:44

Hi Ziad, Very nice of you to
 
Hi Ziad,
Very nice of you to offer your help. I have put together a test case which should run on the twoPhaseEulerFoam-application that comes with OpenFOAM-1.3. When the case reaches 1.45 seconds, the influx of fluid begins at the outlet. Note that the Ub-field is zero on these faces. (I included the output results in case you do not wish to run the case from the beginning)

I put the case up for download on my homepage (1.4M). Euler packing

best regards
Rasmus H

ziad January 22, 2007 18:44

Hi Rasmus, I was hoping to
 
Hi Rasmus,

I was hoping to get it before the weekend as I am typically vey busy over the week. Nevertheless I will try to take a shot at it sometime this week.

Cheers,
Ziad

ziad January 25, 2007 22:19

Hey Rasmus, what are the ph
 
Hey Rasmus,

what are the physical boundary conditions for your problem? for example: pressure gradient between inlet and outlet, flow properties at the inlet and outlet, etc...

Ziad

hemph January 26, 2007 08:12

Hi Ziad, I am simulating par
 
Hi Ziad,
I am simulating particles settling under a fluid velocity field in a 2D-column with a top (inlet), bottom (outlet) and walls. The simulations include the influence of gravity. The physical boundary conditions I have set are:

top: gradient of pressure = 0 (should really be fixed to rho*g, but this is stable enough).
Ub, the velocity of the fluid, is constant 3mm/s. Ua, the particle velocity, is zero gradient. The particle volume fraction, alpha, is set to zero, but there are no particles at top, so this is not crucial.

bottom: Fixed pressure of zero pascal. Alpha is set to zero-gradient. The particles should stay on the bottom and pack, so zero velocity for particles (Ua). For the fluid, I want zero gradient at the outlet, but this becomes unstable and causes backflow at outlet after some time.

To remedy the backflow problem, I applied the inletOutlet-condition. My question is not so much to get the test case running properly. I am wondering if the inletOutlet condition is working properly for the twoPhaseEulerFoam code?

Even though the inletOutlet BC sets zero velocity for the fluid at the backflow faces as it should, the *flux* at these faces is still negative (as can be seen by looking at the phib-field for the outlet patch). This says that fluid is flowing in through the outlet, even though it should be fixed to zero according to the boundary condition. I am hoping to find out if this should be fixed in the twoPhaseEulerFoam code, or if it in fact is the expected behavior!

Best Regards
Rasmus

ziad January 27, 2007 17:24

Hi Rasmus, Thanks for the c
 
Hi Rasmus,

Thanks for the clarifications. It makes a lot more sense now.

I went to your web-page to check out your setup and the schematic indicates that there should be clean fluid flowing from the outlet. A quick google search on chromatography confirmed that and indicated that the outlet should see a Stokes flow, or creeping flow, with Re~1. This will not be achieved by the InletOutlet BC. Instead I would suggest to use a fixed pressure BC equal to the hydrostatic head (or alternatively a fixed pressure gradient = rho_mixture*g). This is an acceptable approximation since dynamic pressure is negligible wrt static head in Stokes flows. You don't have to change your pressure BC at the inlet as long as your pressure BC at the outlet is restricted to the hydrostatic difference between the two planes. Of course I am assuming that your column is vertical... ;)

Nice picture by the way! Make sure you wear some sunblock http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

Cheers,
Ziad

hemph January 29, 2007 04:55

Hi Ziad, Thanks for taking the
 
Hi Ziad, Thanks for taking the time too look at the case! In order to match the experimental setup, I need a fixed velocity inlet BC with a corresponding fixed (rho*g) gradient on pressure. At the outlet however, I believe that zero gradient on velocity and fixed pressure should be applicable.

The inletOutlet condition on velocity sets a zero gradient on velocity, with the initial constrain that if the solution is develops backFlow at an outlet face, that face is limited to a fixed velocity (in this case zero).

However, my interest with this thread is not primarily to get the case running, but to find out if the inletOutlet condition is working for two fluid flows. That is, could this flow field be possible with the inletOutlet B.C ?? (small continuity errors)
http://www.tfd.chalmers.se/~md8hemra/images/outflow.png

I will put the question on the bug mailing list.
//Rasmus.

ziad January 29, 2007 10:12

I get your point. the thing is
 
I get your point. the thing is you are injecting fluid from the inlet and yet your outflow velocities are both zero for fluid and particles. the inletOutlet BC seems to work pretty well considering the flow is fighting it physically.

hemph January 29, 2007 10:47

The inletOutlet BC does not se
 
The inletOutlet BC does not set zero velocity on the whole of the outlet, that would make the case impossible to solve. It is a mixed boundary condition, meaning that on the cell-faces of the outlet where the fluid is flowing out of the domain, there is zero gradient BC in velocity. For the two or three cell-faces where the fluid is about to flow in, velocity is set to fixed value zero. My idea was to limit the unphysical influx. I since came up with a better idea, but the question still remains:

Could it be possible to get the flow field pictured in the link above with the inletOutlet BC? I expected this boundary condition to limit influx of fluid through the outlet to zero.

(I am sorry if the question was unclear!)
//Rasmus


All times are GMT -4. The time now is 03:38.