CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Oscillating flow: wrong results when flow is negative (https://www.cfd-online.com/Forums/cfx/149004-oscillating-flow-wrong-results-when-flow-negative.html)

bongbang February 23, 2015 17:42

Oscillating flow: wrong results when flow is negative
 
This is a minimal transient test case for an oscillating flow. The geometry is 1/6 of a tube with appropriate symmetry planes. The inlet velocity is specified by a data profile (with t and r dependence). The outlet ("opening") has a "opening pressure and direction" of 0 relative to the reference.

The result looks good when flow is positive.

http://s1.postimg.org/u9vdbsba7/image.png

However, when flow is negative, velocity inside the domain drops to 0 even though the outlet profile correctly correctly corresponds to the inlet one. I understand negative flow can be tricky, but the software should be able to handle this case easily. How can I fix this? Thank you.

http://s1.postimg.org/cbehjsefz/image.png

Opaque February 23, 2015 21:41

You should read the definition for Opening Pressure, and see if it matches what you would like to model. The documentation says

Quote:

2.6.1.3. Opening Pressure and Direction

When the flow direction is into the domain, the pressure value is taken to be total pressure based on the normal component of velocity. When it is leaving the domain, it is taken to be relative static pressure.

This option also requires that the Flow Direction is specified, and is used if the flow is into the domain. For details, see Flow Direction.

This is the most robust and stable setting for a pressure specified opening because it puts a constraint on the momentum transported through the boundary condition.
When the flow changes sign at the boundary, is the effective BC setup what you intend to model, i.e. Velocity inlet->Static Pressure, and Velocity Inlet-> Total Pressure (based on Normal Component) ?

bongbang February 23, 2015 22:07

I did read that part and admittedly didn't quite understand. Reading again, I'm starting to think that setting "static pressure and direction" might have been more appropriate, although that simulation is less robust according to the automatic warning. But I tried that, too, and got the same result (I will doublecheck tomorrow, but I'm 80% sure).

Correct me if I'm wrong, but I don't see (absolute) pressure as a crucial part of my model since it is the pressure difference that drives this simple flow. So let's say I go with the default 1 atm static pressure at the outlet (= 0 "relative static" + 1 "reference"), then the pressure at the inlet and everywhere else will be implicit in the velocity specified or derived. I.e. the pressure at any location will be 1 atm + Delta P required to produce the flow.

bongbang February 24, 2015 13:09

I figured it out. The results are indeed correct, as can be seen in the vector plot below. The contour plot just doesn't seem to know how to deal with negative values.

http://s17.postimg.org/3maxrlvq7/w13_2.png

Opaque February 24, 2015 15:16

You got it. There is nothing wrong with the software, nor it is doing anything strange.

You are plotting contours for the velocity magnitude which is always positive.

Thomas MADELEINE February 25, 2015 03:55

What do you plot on your contour profile on the symmetry faces ?
It looks like it is Z velocity in a range from 0 to 0.001795
if it is Velocity (so the magnitude) it should be red too

bongbang February 27, 2015 13:10

Yes, Thomas, that's what I thought to. I plotted velocity, of course, as you can see from the image at the top. The magnitude of velocity in the domain during negative flow is obviously not 0, as you can see from the vector plot. This looks like a bug to me.

Opaque February 28, 2015 09:58

There is no such thing as negative flow unless you set a reference of what is positive. For example, flow crossing a boundary can be both positive or negative depending on your convention of normal vectors, and what you define as positive.

Some textbooks define positive flow as V.n > 0 which means nothing yet unless you define your normals. For outwards normals, V.n< 0 at inlets and >0 at outlets. For inward normals the opposite is true. Now, which one is right, or correct ?

The situation is more complicated in the interior where there is no boundary to refer to. Then, it makes little sense talking about flow sign. The vectors are interpreted as they should, a magnitude (positive by definition) and direction.

bongbang February 28, 2015 12:03

Of course, the sign depends on the frame of reference. We're talking talking about V_z, which is positive in the positive z direction. The coordinate system is right there on every plot.

Do you have an explanation as to why the contour plot should show the magnitude of 0 in domain the second picture. If not, then I say that's a bug.

Opaque February 28, 2015 17:20

Are you plotting conservative values, or hybrid values ?

For hybrid values, I guess you have non-slip walls; therefore, the 0 value. However, for conservative values I would expect non-zero values for a non-recirculating flow.

ahmed ramadan March 23, 2015 05:52

Hello!
I have the same problem how can i see the reverse flow ?

bongbang March 23, 2015 16:30

Ahmed, do what I did above. Use vector instead of contour.

Opaque, what you assumed to be wall is actually just an interface in the flow field (see my vector plot above). So its blue coloring in the contour plot is simply wrong.

ahmed ramadan March 25, 2015 03:56

Ok , i will and i will send the results


All times are GMT -4. The time now is 22:06.