##### Posted by: william

«**on:**May 11, 2012, 10:03:53 PM »

In CFX it is possible to set a buoyancy reference density which causes the gravity head associated with this density to be removed from the pressure field. Thus, with a single, incompressible fluid, if you set the buoyancy reference density equal to the fluid density you can set a constant pressure at a vertical pressure boundary. However, when there is more than one fluid, as is the case with free surface flows, it is not possible to completely eliminate the gravity head from the pressure field and so an expression must be used. Firstly, an assumption needs to be made about the height of the free surface at the vertical boundaries.

To see how using a buoyancy reference density affects the expression for the pressure imagine a domain in which z is vertical with z=0 at the bottom, z=h at the height of the water and z=zTop at the top of the domain.

Thus, the volume fraction of air (vfair) and water (vfwater) can be given by:

vfair = step(z-h);

vfwater = 1 -vfair

The absolute pressure (pabs) is then:

pabs = pTop

+ vfair*rhoair*g*(zTop-z)

+ vfwater*rhoair*g*(zTop-h)

+ vfwater*rhowater*g*(h-z)

when using a non zero buoyancy reference density (rhoref)

pabs = p + pref + rhoref*g.(r-rref) [scalar product for vectors g, r, rref]

= p + pref - rhoref*g*(z-zref) [g in -z direction]

=> p = pabs - pref + rhoref*g*(z-zref)

= pabs - pref + vfair*rhoref*g*(z-zTop + zTop-zref)

+ vfwater*rhoref*g*(z-h + h-zTop + zTop-zref)

=> p = pTop - pref + vfair*rhoref*g*(zTop-zref) + vfwater*rhoref*g*(zTop-zref)

+ vfair*(rhoair-rhoref)*g*(zTop-z)

+ vfwater*(rhoair-rhoref)*g*(zTop-h)

+ vfwater*(rhowater-rhoref)*g*(h-z)

By setting appropriate values for zref and rhoref (e.g. zref=zTop, rhoref=rhoair) many of the terms in the above expression will disappear.

However, this expression is easy to get wrong. For example, the expression in tutorial 7 (up to CFX-11.0 at least) is not correct.

Also, given that it is not possible to completely eliminate the gravity head many people prefer to set the buoyancy reference density to zero and use the first expression for the pressure (with p = pabs -pref) which is a lot easier to formulate.

To see how using a buoyancy reference density affects the expression for the pressure imagine a domain in which z is vertical with z=0 at the bottom, z=h at the height of the water and z=zTop at the top of the domain.

Thus, the volume fraction of air (vfair) and water (vfwater) can be given by:

vfair = step(z-h);

vfwater = 1 -vfair

The absolute pressure (pabs) is then:

pabs = pTop

+ vfair*rhoair*g*(zTop-z)

+ vfwater*rhoair*g*(zTop-h)

+ vfwater*rhowater*g*(h-z)

when using a non zero buoyancy reference density (rhoref)

pabs = p + pref + rhoref*g.(r-rref) [scalar product for vectors g, r, rref]

= p + pref - rhoref*g*(z-zref) [g in -z direction]

=> p = pabs - pref + rhoref*g*(z-zref)

= pabs - pref + vfair*rhoref*g*(z-zTop + zTop-zref)

+ vfwater*rhoref*g*(z-h + h-zTop + zTop-zref)

=> p = pTop - pref + vfair*rhoref*g*(zTop-zref) + vfwater*rhoref*g*(zTop-zref)

+ vfair*(rhoair-rhoref)*g*(zTop-z)

+ vfwater*(rhoair-rhoref)*g*(zTop-h)

+ vfwater*(rhowater-rhoref)*g*(h-z)

By setting appropriate values for zref and rhoref (e.g. zref=zTop, rhoref=rhoair) many of the terms in the above expression will disappear.

However, this expression is easy to get wrong. For example, the expression in tutorial 7 (up to CFX-11.0 at least) is not correct.

Also, given that it is not possible to completely eliminate the gravity head many people prefer to set the buoyancy reference density to zero and use the first expression for the pressure (with p = pabs -pref) which is a lot easier to formulate.