CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Pressure BCs for rasInterFoam tank fillingdraining problem (https://www.cfd-online.com/Forums/openfoam-solving/58545-pressure-bcs-rasinterfoam-tank-fillingdraining-problem.html)

kwardle August 29, 2008 09:40

I am relatively new to OF and
 
I am relatively new to OF and have been working for some time on a tank filling/draining problem using rasInterFoam. The basic geometry is a symmetrical rectangular tank with a side inlet and a bottom drain and the top surface is open to atmosphere to allow the liquid level to equilibrate based on the inlet flow conditions.

I am not sure which boundary conditions are appropriate particularly for pressure. Starting from a 2d case, I was able to determine that the only BCs for pd that would allow the liquid level to drop when the inlet flow was zero (tank draining only) is gammaFixedPressure on the top surface and the bottom outlet. However, when I went to 3D, the simulation crashes after just a few iterations with velocity spikes (and/or unbounded epsilon) at the liquid interface. The initial gamma field was a half full [or half empty ;-)] tank. By accident, I found that if I start the simulation with the gravity vector off-normal relative to the liquid interface (and all upwind) and gradually shift it back to normal the solution proceeds but ONLY when there is inflow. It dies when there is no liquid inflow. Even the simulation that seems to go ends up with very strange behavior on the upper surface (where there could be flow of air inward or outward). Here the pd file at a time after startup shows very strange things for the "p" profile (discontinuous pressures of 1e-315) but the "value" profile is reasonable and smooth.

My questions:
(1) What boundary conditions should I be using for this problem? Specifically, is gammaFixedPressure appropriate? If so, what do I need to specify? For example for the top surface for pd:
top
{
type gammaFixedPressure;
U U;
phi phi;
rho none;
psi none;
gamma 1;
p uniform 0;
value uniform 0;
}

Is this correct for the upper surface (open to atmosphere)? What do the lines for U, phi, rho, psi, and gamma mean? There was no explanation of this BC type anywhere so I copied the input format from totalPressure examples.

(2) Why does the simulation have trouble starting with a stationary interface that is normal gravity? Why the differt solution behavior between 2D and 3D?

(3) Why in the pd files for later time steps are there boundary values for both "p" and "value" on the top surface, what exactly are these describing? Incidentally, the outlet remains as "uniform 0" for both "p" and "value". I assume this is because there is no backflow.

I apologize for the lengthy post, but I have been beating my head against this problem for some time and could really use some help. If I am missing something basic that is explained somewhere else PLEASE let me know--I have read many many other threads and tried to find answers.
PLEASE HELP!
-Kent

girogirozakk August 29, 2008 10:15

like this? http://jp.youtub
 
like this?

http://jp.youtube.com/watch?v=RjA4sAUXiBc

kwardle August 29, 2008 10:43

Giro, Yes. That is essentiall
 
Giro,
Yes. That is essentially the problem although I also would have inlet flow at the same time. I would appreciate any help you could offer. What boundary conditions did you use for the top and the outlet? Would you be willing to send me the files for this problem?
Thanks,
Kent

girogirozakk August 30, 2008 05:55

Kent, I used "total pressure"
 
Kent,
I used "total pressure" BC , for the inlet and outlet (both surface).
I seted outlet's total pressure equal to the outlet-flow's kinetic energy.
Because , I want to set the outlet-flow's velocity to constant value.

Please wait a few days (or 1week) to send you sample-files(if you want).
Because , now I check my result to some experiment data.

Sorry , I'm Japanease , and my sentence is not so good ... .

Bye,
Giro

kwardle September 2, 2008 10:14

Giro, thanks for the response.
 
Giro, thanks for the response. It looks like you are specifying a fixed outlet velocity and a fixed negative pressure at the outlet boundary. This is not what I want--I would like the outlet velocity and pressure to be calculated and the flow to be induced by gravity. Can anyone tell me how I need to set up the boundary condition on the outlet to do this?

jfb September 2, 2008 17:05

Hi Giro could You send them t
 
Hi Giro
could You send them to me too? Thanks a lot,
Josef

girogirozakk September 3, 2008 06:07

Kent,This is ..... not good ?
 
Kent,This is ..... not good ?
http://jp.youtube.com/watch?v=U0G6kn03CTU

kwardle September 3, 2008 10:12

Giro, sure, that is the idea.
 
Giro, sure, that is the idea. However, I would like to set the outlet boundary as the tank outlet. I have found some conditions that work for my case (totalPressure for the top, fixedValue for the outlet, inletOutlet for all others on the outlet), but these only work at the beginning with all divSchemes to upwind. Even then it can crash at some later point.

After looking at this more, it really seems to be an issue of interfacial instabilities rather than BCs. When the simulation crashes, it is always after large spikes in velocity (and/or epsilon) at some point on the liquid/air interface. It seems like others have observed this same problem (http://www.cfd-online.com/cgi-bin/Op...=2531#POST2531). Is this an issue with the interface compression scheme? When I change cGamma to 1, things seem to go much smoother. Doesn't this scheme add an 'artificial' velocity in the interfacial region in order to induce interfacial compression? Can anyone clarify this or point me towards some detailed description of the scheme?

Has anyone implemented a reliable piecewise interface reconstruction (PLIC) algorithm for VOF in OpenFOAM? How would I go about doing that? I am curious to see how this compares.

kwardle September 17, 2008 14:37

All, I was able to solve the
 
All,
I was able to solve the convergence problem by setting cgamma equal to 1. I am not sure why it is set to 2 for the tutorials (e.g. damBreak). This gives a solution for the draining problem. But for the actual problem of interest, where there is constant inflow and draining at the same time in a manometer type geometry--that is, the flow from the drain is opposite gravity--I would like to be able to specify the *static pressure* on the outlet. How do I specify a constant value for the static pressure? For the standard interFoam setup, the boundary value for 'pd' is defined where (unless I am mistaken) pd is the dynamic pressure:

p = (0.5*rho*U^2) + (rho*g*h) = pd + ps

I understand there is a post-processing utilty interFoamPressure for calculating the static pressure. Has anyone used this to construct a staticPressure boundary? Is there some better way such as to to use p rather pd for the boundary field? How does one do this?
Thanks,
Kent


All times are GMT -4. The time now is 01:00.