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

 Antonio.vucci January 22, 2013 09:31

buoyantPressure

Hi everyone

.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 14:19

 wyldckat January 24, 2013 17: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("g");     const fvPatchField& rho =         patch().lookupPatchField(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 17: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 16: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 14: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 09: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:31.