CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   buoyantPressure (https://www.cfd-online.com/Forums/openfoam/112112-buoyantpressure.html)

Antonio.vucci January 22, 2013 08:31

buoyantPressure
 
Hi everyone
please please someone clearfy this boundary condition: "buoyantPressure"

every where i read or ask, just hear something like this:
.the buoyantPressure boundary condition is applied to the pressure field, which calculates the normal gradient from the local density gradient.

please someone describe this BC with math and physics. what will exactly happen when we set buoyantPressure at boundary???:confused:

thanks all


Antonio.vucci January 24, 2013 13:19

no one can explain something about this BC? every thing that you know!!!!:(

wyldckat January 24, 2013 16:22

Greetings Antonio and welcome to the forum!

I don't know the specific mathematical equations, but according to the source code: https://github.com/OpenFOAM/OpenFOAM...uoyantPressure
Quote:

buoyantPressureFvPatchScalarField.H:
Code:

Set the pressure gradient boundary condition appropriately for buoyant flow.

If the variable name is "pd" assume it is p - rho*g.h and set the gradient
appropriately.  Otherwise assume the variable is the static pressure.

buoyantPressureFvPatchScalarField.C:
Code:

    const uniformDimensionedVectorField& g =
        db().lookupObject<uniformDimensionedVectorField>("g");

    const fvPatchField<scalar>& rho =
        patch().lookupPatchField<volScalarField, scalar>(rhoName_);

    // If the variable name is "p_rgh", "ph_rgh" or "pd"
    // assume it is p? - rho*g.h and set the gradient appropriately.
    // Otherwise assume the variable is the static pressure.
    if
    (
        dimensionedInternalField().name() == "p_rgh"
    || dimensionedInternalField().name() == "ph_rgh"
    || dimensionedInternalField().name() == "pd"
    )
    {
        gradient() = -rho.snGrad()*(g.value() & patch().Cf());
    }
    else
    {
        gradient() = rho*(g.value() & patch().nf());
    }


For a more interactive method of browsing through the source code, try the OpenFOAM C++ Documentation online page: http://foam.sourceforge.net/docs/cpp/index.html

As for buoyancy equations, did you try Wikipedia? http://en.wikipedia.org/wiki/Buoyancy ;)
If you compare the source code with those equations, I think you might understand things a bit more ;)

Best regards,
Bruno

Antonio.vucci January 24, 2013 16:49

Hi Bruno
Thanks for your comment. i tried source codes before, but if i knew the codes, why i asked my friends to help!!!!!!!!!!!!!!!. ;);)
i think i know enough about buoyancy but OpenFoam, BC and codes are something else!

i think it's cant help: "
If the variable name is "pd" assume it is p - rho*g.h and set the gradient
appropriately. Otherwise assume the variable is the static pressure.

by the way thank you for your attention. is there any idea

Regards

wyldckat January 26, 2013 15:13

Hi Antonio,

Unfortunately, time is very limited for everyone these days. And I'm not familiar with this boundary condition, so I provided you with the reference details, so that you could use them as a starting point to investigate it further.

From what I can briefly understand, this boundary condition takes into account the density of the fluid and balances the pressure with "rho*g*h", by affecting the pressure gradient directly. The code is also taking into account the vectorial values between the patch the BC is on and gravity's vector.

If you still have questions on this, please indicate what are the specific details that you are having trouble understanding.

Best regards,
Bruno

Antonio.vucci February 4, 2013 13:31

Hi Bruno
special thanks to your reply, unfortunately i couldn't acces this site for twoo weeks.
for first:
"this boundary condition takes into account the density of the fluid and balances the pressure with "rho*g*h", by affecting the pressure gradient directly.."
im sorry really i cant understand: how it balance pressure with rho*g*h ?

giack March 7, 2013 08:27

hi Antonio,
you can find all the information about buoyant pressure here:
http://foam.sourceforge.net/docs/cpp...0.html#details


All times are GMT -4. The time now is 23:53.