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 in buoyantBoussinesqSimpleFoam (https://www.cfd-online.com/Forums/openfoam-solving/190960-pressure-buoyantboussinesqsimplefoam.html)

Gohu8 July 27, 2017 04:36

pressure in buoyantBoussinesqSimpleFoam
 
Hello everyone,

I use buoyantBoussinesqSimpleFoam solver. My case is close to the windaroundBuildings tutorial. Each parameter seems to work fine, but when I want to read the pressure, I select p and the scale starts from approximately -712 until 707. So I can read that the average pressure around the buildings is about -360. The units are supposed to be in m²/s². So to have the real pressure in Pascal, I am supposed to multiply it by rho. But here rho = 1.2 kg/m^3 ~ 1 kg/m^3, so it should be a pressure of -360 Pa which is completely wrong !

PS: for the same time, when I read p_rgh, the scale starts from -100 until 17... and the average pressure around buildings seem to be close to 0....

I used simflow for this case. In initial conditions: p-rho*g*h=0.
In boudary conditions: for the inlet: p-rho*g*h is zero gradient
for the outel: p-rho*g*h is fixed value =0

student666 July 27, 2017 14:30

Have you set internal field for p and p_rgh equal to 0 or 10e5 Pa?

Sent from my ASUS_X008D using CFD Online Forum mobile app

Gohu8 August 8, 2017 05:38

Quote:

Originally Posted by student666 (Post 658666)
Have you set internal field for p and p_rgh equal to 0 or 10e5 Pa?

Sent from my ASUS_X008D using CFD Online Forum mobile app


EDIT: I found in the folders that p and p_rgh are both defined as:

internalField uniform 0.0


Here is some screenshots:

for p:

https://img4.hostingpics.net/pics/87...0808114813.png


for p_rgh:

https://img4.hostingpics.net/pics/35...0808115150.png

Gohu8 August 8, 2017 07:10

Quote:

Originally Posted by student666 (Post 658666)
Have you set internal field for p and p_rgh equal to 0 or 10e5 Pa?

Sent from my ASUS_X008D using CFD Online Forum mobile app

In p and p_rgh I have:

internalField unfinorm 0.0


Here some screenshots:

for p:

https://img4.hostingpics.net/pics/63...0808114813.png


for p_rgh:

https://img4.hostingpics.net/pics/54...0808115150.png

Mahmoud Abbaszadeh June 13, 2022 10:50

Dear Foamers,

It’s been a while that I’ve had the same problem in setting the correct BC for similar problems. Here is the review of how I solved this issue:

Problem: steady state open channel flow simulation. In this scenario, normally the simpleFoam is employed. The BCs are given by:


BCs: inlet, outlet, wall, topWall

U:

inlet
{
type fixedValue;
value uniform (0 0.1589 0);
}

outlet
{
type zeroGradient;
}

wall
{
type noSlip;
}

atmosphere
{
type slip;
}

p:

atmosphere
{
type zeroGradient;
}

inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 0;
}

wall
{
type fixedFluxPressure; //remember that we cannot use Drichlet and Neuman BC at the same time
value uniform 0;
}


As one can see, selecting fixedValue BC for the outlet pressure is physically incorrect even though one can get result. To resolve this issue, I decided to use the hydrostatic pressure as the outlet BC for the pressure. To this end, one need to either define gravity in the governing equation or else use a steady state solver that has gravity in the equations. I went for the second approach. The only available solver for incompressible fluids that has this feature is buoyantBoussinesqSimpleFoam. When this solver is selected, the BCs needs to be defined for the U, p, and p_rgh. Generally, p_rgh=p-rho*g*h. I have searched a lot and finally could find the correct way of setting BC for the foregoing parameters.


U:

inlet
{
type fixedValue;
value uniform (0 0.1589 0);
}

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

wall
{
type noSlip;
}

atmosphere
{
type slip;
}


P:

atmosphere
{
type zeroGradient;
}

inlet
{
type zeroGradient;
}

outlet
{
type calculated;
value $internalField;
}

wall
{
type zeroGradient;

}



P_rgh

inlet
{
type fixedFluxPressure;
}

outlet
{
type fixedValue;
value uniform 0;
}

wall
{
type fixedFluxPressure;
}

atmosphere
{
type fixedFluxPressure;
}


let me know if it is not clear.

Keep Foaming


All times are GMT -4. The time now is 19:48.