CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   BC for outlet - interFoam (

pedroxramos April 9, 2013 09:34

BC for outlet - interFoam

I'm doing the flow simulation around a cylinder but this happens:

I'm thinking that the problem ins the boundary condition on "outlet".

What you suggest?

Best regards.

vainilreb April 9, 2013 09:40

1. What do we see on this picture? I guess it's alpha?
2. Where's the cylinder located?
3. Could you please post your BC files?



pedroxramos April 9, 2013 09:49

Hi Robert!

See this video and you will understand:

Please, take a look on my files:

vainilreb April 9, 2013 10:46


my first guess is that you should change your pressure BC. I'ts right to fix p_rgh to zero, but doing the same with p, which is p_rgh + rho*H*g won't work. I would give "phaseHydrostaticPressure" a try.

Best, Robert

pedroxramos April 9, 2013 11:01

Thanks. I'm sorry but I'm new in openfoam, so i didn't understand clearly what you suggest.

"phaseHydrostaticPressure" is a BC?

should I change p for all patches or only in outlet?

vainilreb April 9, 2013 11:18

Oh, right. Sorry! ;)
phaseHydrostaticPressure is a BC for pressure.
Try this for p --> outlet

type phaseHydrostaticPressure;
phaseName alpha1;
rho none;
pRefValue 0;
pRefPoint (0 0 0); // fill in z-coordinate of the water surface for z
value uniform 0;

I hope this helps. Please report. ;)

pedroxramos April 9, 2013 12:14

thank you so much for your help. unfortunately, it dind't work. see for yourself:

the video is short but it seems that the problem is already there.

please, can you help me? i am with this problem for weeks....


vainilreb April 9, 2013 14:43


I've had a closer look at your video and now I've realized that the graph in the lower right corner shows the plot of the values along the flow direction.
You see that the pressure is high at the inlet and drops to zero at the outlet, because you fixed it to zero.

Have you tried to set the BC for U at the outlet to "zeroGradient"?

I'll try some things tomorrow on my workstation, there's no OpenFOAM available here right now. But zeroGradient might already fix this.

Best regards,


pedroxramos April 10, 2013 06:03

It didn't work again :/ Video is here:

And if the problem isn't in the outlet BC?

The files are here:

I appreciate a little help!

pedroxramos April 16, 2013 10:25

Hello again... it didn'w work... i'm working in this for will turning me crazy!

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