CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD

How does fixedFluxBuoyantPressure work

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

LinkBack Thread Tools Display Modes
Old   September 19, 2008, 09:40
Default Hi all I am trying to figur
New Member
Dragan Vidovic
Join Date: Mar 2009
Posts: 17
Rep Power: 10
vitke is on a distinguished road
Hi all

I am trying to figure out how does the fixedFluxBuoyantPressure bc work, because I want to modify it to set the outer normal derivative of the potential h (which is my primary variable) to -(rho-rho0)/rho0 (n*vector(0,0,1)), where n is the outer normal, rho is a scalar field, and rho0 is a constant.

I found somewhere that "fixedFluxBuoyantPressure is used to setup full pressure field on boundaries (p+r*g*h)". Here is the updateCoefs() code of this bc:

void fixedFluxBuoyantPressureFvPatchScalarField::update Coeffs()
if (updated())

const dictionary& environmentalProperties
= db().lookupObject<iodictionary>("environmentalProp erties");

dimensionedVector g(environmentalProperties.lookup("g"));

const fvPatchField<scalar>& rho =

gradient() = -rho.snGrad()*(g.value() & patch().Cf());


Here go my questions:

1) Why does this method set the gradient? In my understanding, it should set the value to -rho*(g.value() & patch().Cf()) plus the value specified as the bc. Why does it set the gradient to the normal derivative of this thing? Is the value set somewhere else?

2) Why does it call fixedGradientFvPatchScalarField::updateCoeffs() and what does this do? Sets the value? Or just sets the "updated" indicator to true?

3) Why was this class derived from fixedGradientFvPatchScalarField if it is supposed to set the pressure and not it's gradient?

4) Finally, how can I set the normal derivative of my potential? This is supposed to set my flux to zero. I tried to play with that gradient() = ... line, but it does not work, which is not strange since I don't understand how this should work.
vitke is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
why CFX help can't work? prayskyer CFX 5 December 17, 2006 17:15
Work in cfd snari Main CFD Forum 0 February 10, 2006 10:46
i can't work it out,help me,thanks! ATao Siemens 1 August 7, 2005 10:48
CFX 5.5.1 for 2D work blair CFX 9 May 20, 2003 10:29
Will the UDF work?? H.S.Fang FLUENT 0 December 27, 2001 22:21

All times are GMT -4. The time now is 01:54.