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/)
-   -   backflow with pressureInletOutletVelocity BC (https://www.cfd-online.com/Forums/openfoam-solving/254524-backflow-pressureinletoutletvelocity-bc.html)

geth03 February 15, 2024 10:41

backflow with pressureInletOutletVelocity BC
 
1 Attachment(s)
hi all,

despite declaring the outlet as pressureInletOutletVelocity with zero inflow velocity:

"outlet.*"
{
type pressureInletOutletVelocity;
phi phi;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}

i am having backflow from the outlet patch. (see atached screenshot)

i thought that inletValue -> 0 would prevent backflow in the domain, am i missing something?

any help is appreciated, kind regards

Yann February 15, 2024 11:03

Hello,

I think there is a confusion about the BC name: if you want to avoid backflow you should use an inletOutlet BC with inletValue set to 0.

The whole point of pressureInletOutletVelocity BC is to be able to compute a velocity if there is back flow. (And there is no inletValue parameter for pressureInletOutletVelocity )

Regards,
Yann

geth03 February 15, 2024 11:25

hi Yann,

thanks for your fast response.

HTML Code:

https://github.com/OpenFOAM/OpenFOAM-10/blob/master/tutorials/lagrangian/denseParticleFoam/cyclone/0/U.air
here, however the BC is used like my post above, actually i copied my BC from this tutorial. it is kind of misleading that this appears in a tutorial if it is not even used.

Yann February 15, 2024 11:44

Yes it often happens in tutorials and it can be quite misleading indeed.

Since you are using OpenFOAM-10, foamInfo is pretty handy to get information about boundary conditions. (and other things!)

Code:

foamInfo pressureInletOutletVelocity

2538sukham March 16, 2024 09:40

1 Attachment(s)
The outflow boundary condition for velocity in some paper in this case attached is kept as zeroGradient. I am confused about the pressure boundary condition? For now I am following the damBreak atmosphere boundary condition totalPressure with p0 as 0. Whereas somewhere I found that they have specified a pressure value at the outlet. Although the simulation runs, I am skeptic of the fixed pressure with zeroGradient of velocity at outlet. Any suggestions? @Yann

Yann March 18, 2024 04:07

Hello Michael,

I am not sure to understand your question.
Whether you use totalPressure or fixedValue at the outlet, you're still defining a fixed pressure (either fixing static or total pressure).

For the velocity, zeroGradient is fine as long as there is no backflow, otherwise it might be unstable.
PressureInletOutletVelocity is useful if you do expect backflow and you want a BC able to handle it.
Another common BC is to use inletOutlet on the velocity at the outlet, with an inletValue of (0 0 0). This is a way to forbid backflow as you specify a 0 velocity on it.

I hope this helps,
Yann

2538sukham March 18, 2024 08:05

Velocity:
outlet
{
type inletOutlet;
phi phi; //Don't know since its optional
inletValue uniform 0; // No backFlow or velocity (0 0 0)
value uniform 0; // Isn't it suppose to give me zeroGradient?
}
Pressure: p_rgh

outlet
{
type totalPressure;
value uniform 0; // Setting a fixed pressure 0 Pa.
}
Apart from some doubts which let me look into the src I think considering no backFlow, the U and p_rgh bc works with this combination. Thank you Yann.

Yann March 18, 2024 08:37

This should be the proper syntax, as U expect a vector instead of a scalar:
Code:

outlet
{
        type                inletOutlet;
        inletValue        uniform (0 0 0);
        value                uniform (0 0 0);
}

And for totalPressure, the total pressure you want to fix is defined by the p0 parameter which is missing in your example.

Code:

outlet
{
        type        totalPressure;
        p0        uniform 0;
        value        uniform 0;
}

On both boundary conditions, the value parameter is just a placeholder, it won't affect the behavior of your boundary condition (and I think you should be able to remove it in recent openfoam versions).
(more details here: https://www.cfd-online.com/Forums/op...tml#post786015)

2538sukham March 18, 2024 08:45

Sorry forgot about the volVectorField. Yes it should be (0 0 0). I messed up the syntax about p0 as well. If I get into the more technical stuff, I would post here so that others could follow. Thanks!!
P.S: Since there is no inlet pressure in this case (i.e. moving wall - fixedFluxPressure) I think the value of pressure p0 wouldn't matter as the simulation is incompressible and its the pressure difference which is the driving force and not the absolute pressure.

qingqingliu March 18, 2024 16:00

Quote:

Originally Posted by geth03 (Post 864780)
hi all,

despite declaring the outlet as pressureInletOutletVelocity with zero inflow velocity:

"outlet.*"
{
type pressureInletOutletVelocity;
phi phi;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}

i am having backflow from the outlet patch. (see atached screenshot)

i thought that inletValue -> 0 would prevent backflow in the domain, am i missing something?

any help is appreciated, kind regards

The backflow may not be related to your outlet boundary condition setup, instead, it could be caused by the setup of your problem. It is better to describe your whole geometry and problem.


All times are GMT -4. The time now is 20:29.