CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   buoyantBoussinesqPimpleFoam zero velocity (http://www.cfd-online.com/Forums/openfoam-solving/106375-buoyantboussinesqpimplefoam-zero-velocity.html)

dl6tud August 27, 2012 10:50

buoyantBoussinesqPimpleFoam zero velocity
 
1 Attachment(s)
For making a new solver it is important to see, that without any force or pressure, the velocity is 0.
I tried that with the hotRoom example of buoyantBoussinesqPimpleFoam. I just changed the temperatur-field to be constant in the whole area and got the result shown in the picture.

It seems, that there is some velocity around the pressure reference cell. Has someone an explanation? I tried pRefCell and pRefPoint and got the same strange U-field.

fvsolution:
Quote:

pRefCell 0;
pRefValue 0;
T:
Quote:

internalField uniform 300;

boundaryField
{
floor
{
type zeroGradient;
}
ceiling
{
type zeroGradient;
}
fixedWalls
{
type zeroGradient;
}
}
p_rgh:
Quote:

internalField uniform 0;

boundaryField
{
floor
{
type buoyantPressure;
rho rhok;
value uniform 0;
}

ceiling
{
type buoyantPressure;
rho rhok;
value uniform 0;
}

fixedWalls
{
type buoyantPressure;
rho rhok;
value uniform 0;
}
}

dl6tud September 4, 2012 04:37

I found the reason, but do not know the solution yet. Can anyone help?

The pressure reference may be definded as
Quote:

pRefCell 0;
or
pRefPoint (0 0 0);
IMPORTANT: It seems that OF does not take the 'true' coordinate (0,0,0) but looks to which cell it belongs. (So if cell height = 1, it takes (0,0,0.5) as coordinate.)
In buoyantBoussinesqPimpleFoam, it seems, that p_rgh is interpolated to the cell face. If my first cell is 1m high and I use it as reference cell, than OF calculates p_rgh = pRefValue + (1/2) * g. The 0.5 is the distance between cell center and cell surface.
If I use a cell in the second layer as reference cell p_rgh= pRefValue + (1+(1/2))*h_cell *g.

What I want to say: as implemented now, p_rgh is not the pure dynamic pressure, but depends on where the pressure reference is. In my eyes it should be better to set p_rgh = 0 and use it as dynamic pressure. But how to do that?

This issue is a problem, because many people will not know about that. As it is now, p_rgh must allways be initialized with the correct values. Otherwise, the correct pressure will be calculated in the first time step. And that induces a movement of the liquid which is not correct at all. The hotRoom example of buoyantBoussinesqPimpleFoam is therefore slightly wrong!

dl6tud September 13, 2012 04:10

Update:

There are two problems:

(1) p_rgh contains a part of the hydrostatic pressure, depending on the pRefCell

(2) the laplace(T=const.) is not zero, described here: http://www.cfd-online.com/Forums/ope...-sngrad-t.html

Problem 1 can be solved by initializing p_rgh with the correct values, or by correcting the code as follows:

Quote:

Originally Posted by pEqn.H
if (p_rgh.needReference())
{
/* p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
); */

p_rgh = p - rhok*gh;
}

Quote:

Originally Posted by createFields.H
if (p_rgh.needReference())
{
/* p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
*/

(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);

}



All times are GMT -4. The time now is 12:42.