# buoyantPressure

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 22, 2013, 08:31 buoyantPressure #1 New Member   Antonio Join Date: Jan 2013 Posts: 6 Rep Power: 10 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??? thanks all

 January 24, 2013, 13:19 #2 New Member   Antonio Join Date: Jan 2013 Posts: 6 Rep Power: 10 no one can explain something about this BC? every thing that you know!!!!

January 24, 2013, 16:22
#3
Retired Super Moderator

Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,963
Blog Entries: 45
Rep Power: 123
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
__________________

 January 24, 2013, 16:49 #4 New Member   Antonio Join Date: Jan 2013 Posts: 6 Rep Power: 10 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

 January 26, 2013, 15:13 #5 Retired Super Moderator   Bruno Santos Join Date: Mar 2009 Location: Lisbon, Portugal Posts: 10,963 Blog Entries: 45 Rep Power: 123 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 __________________ OpenFOAM: FAQ | Getting started Forum: How to get help, to post code/output and forum guide Read this before sending me PM

 February 4, 2013, 13:31 #6 New Member   Antonio Join Date: Jan 2013 Posts: 6 Rep Power: 10 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 ?

 March 7, 2013, 08:27 #7 Member   Join Date: Mar 2013 Posts: 98 Rep Power: 10 hi Antonio, you can find all the information about buoyant pressure here: http://foam.sourceforge.net/docs/cpp...0.html#details haghajani and wyldckat like this.