5

I have been working with an old code for modeling incompressible, 2D viscous flow out of a tank to understand a chemical process. There isn't much documentation and I'm not a fluid dynamicist, so I have been trying to check that things are working as they should by comparing results with those from another code. The comparison is great when I use a velocity inlet condition. However, there is a major discrepancy when I use a pressure inlet condition. In both cases, the outlet pressure is zero.

I have spent several weeks trying to figure out what the problem is with the pressure inlet condition (and have an active question about it) because I have pressure inlet values that I want to use in my problem. I don't know velocity inlet values. But I have to acknowledge I've hit a wall with figuring out my pressure inlet boundary condition problem.

This may be a dumb question, but I would really appreciate it if someone would help me confirm if I can transform my pressure values into an inlet velocity condition. If I can, maybe I can simply use an inlet velocity and my problems will be over!

I understand that: $$P = \dfrac{1}{2}\rho U^2 + \rho gz$$

where $\rho$ is fluid density, $U$ is velocity, $g$ is the acceleration of gravity, and $z$ is depth of the tank inlet below the tank outlet at 0.

So if I simply plug in my inlet pressure value and rearrange, will I get a valid inlet velocity that I can use for a velocity boundary condition? My concern is that I'm dealing with viscous flow and I think this expression is related to the Bernoulli equation, which does not account for viscous flow.

If I'm right and I can't use this expression to calculate an inlet velocity, does anyone know if there's an alternative?

The reason I say I probably can't is that I've tried it and the results from the two codes don't match. I'm just trying to figure out where my problem is--if it's likely to be a bug in one of the codes, which code is the problem, or if I'm making some mistake when inputting my boundary condition values.

Ant
  • 245
  • 1
  • 5

1 Answers1

1

It's difficult to tell how your problem should be approached with the information that you provide, for example in what sense you find a discrepancy. I assume your system is as you described in the question "Incompressible 2D pressure-driven flow: for Navier-Stokes equations in nondimensional form, how should I express pressure boundary conditions?", with the picture that I copy at the bottom of this post.

The flow is upwards. Normally, the way to replace a velocity boundary condition by a pressure boundary condition is by trial and error until you have the pressure that will generate the same average velocity over your inlet plane. If that is what you did, but you found a different pressure than with the other calculation method, then something is wrong with at least one of the calculation methods and you have to a systematic comparison between the two models, checking all parameters that you can plot and figure out which fundamental parameter is wrong. For example, you could have forgotten to switch on the effect of gravity in one of the codes.

If your question is: how do I calculate the pressure to set at the inlet from just the viscosity and a given inlet velocity, then you are using the wrong approach. The pressure at the inlet will be the result of two contributions: gravity ($P_g=\rho g h$) and flow resistance at the outlet pipe. For that, you need to take the hydraulic diameter $D_H=2a$ of the outlet pipe, get the average outlet velocity $U_o$ and calculate the Reynolds number, $\mathit{Re}=\rho U_o D_H/\eta$. The pressure drop at the outlet will generally have several contributions:

  • Bernoulli: $\Delta p=b\rho U_o^2/2$, where $b$ is a factor to account for the velocity profile of the fluid at the outlet; $b=1$ for a uniform velocity and $b=2$ (I think) for a parabolic velocity profile. This is sometimes called: "exit loss".

  • Friction along the pipe length, also called "major loss": $$ \Delta p_{\mathrm{major}}={fL\over D_H} {\rho U_o^2\over 2}, $$ where $f$ is the Darcy-Weisbach friction factor, which depends on the Reynolds number.

  • Inlet loss, also called "minor loss", $$ \Delta p_{\mathrm{minor}} = \xi{\rho U_o^2\over 2}, $$ where $\xi$ is the minor loss coefficient.

Tabulated values for all these losses in various pipe geometries are in Idelchik, Handbook of Hydraulic Resistance (warning: 21 MB download).

I don't know what happens inside your vessel, but if you're only interested in the relation between flow rate and pressure, I wouldn't even bother with trying to run a CFD code.

flow schematic