# I need explanations about fixedFluxPressure

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

 November 30, 2010, 05:15 I need explanations about fixedFluxPressure #1 Senior Member   Cyprien Join Date: Feb 2010 Location: Stanford University Posts: 230 Rep Power: 9 Hello! I had a look at the fixedFluxPressure boundary condition and I am not quite sure to well understand what this BC does. I guess I have to use this BC if I want to evaluate the pressure according to a velocity input. Am I wrong ? Furthermore, in the code source, one can read: Code:  gradient() = (phip - (patch().Sf() & Up))/patch().magSf()/rAp; I do not succeed in linking this snippet with a mathematical formula... All enlightments are welcome! Regards, Cyp JR22 and Guimloute like this.

 August 19, 2013, 20:36 buoyantPressure vs. fixedFluxPressure #2 Senior Member     Jose Rey Join Date: Oct 2012 Posts: 126 Rep Power: 8 I realize this is an old thread, but it is still very relevant. I was having terrible problems trying to get buoyantBoussinesqSimpleFoam to converge. I changed the p_rgh BC's from buoyantPressure to fixedFluxPressure and the model started to converge. Anybody? Guimloute likes this.

 August 1, 2014, 04:42 #3 Senior Member   Srivathsan N Join Date: Jan 2013 Location: India Posts: 101 Rep Power: 4 Same question here. What is the difference between buoyantPressure and fixedFLuxPressure boundary conditions? __________________ Regards, Srivaths

 October 16, 2014, 02:23 OpenFAOM 2.3.0 doesn't have buoyantPressure BC #4 Senior Member     Fatema Zandi Goharrizi Join Date: Mar 2009 Posts: 137 Rep Power: 8 Hi OpenFAOM version 2.3.0 doesn't have buoyantPressure libraries. Am I right? what is the difference between buoyantPressure and fixedFluxPressure? why fixedFluxPressure converge better? is it the only difference between them? Please help

 October 16, 2014, 03:46 #5 Senior Member     Fabian Roesler Join Date: Mar 2009 Location: Bad Friedrichshall, Germany Posts: 166 Rep Power: 8 OpenFOAM 2.2.2 has both boundary conditions. In newer Version, buoyantPressure boundary was dismissed. For clarification have a look into the code or into Doxygen. From buoyantPressureFvPatchScalarField we learn that: This boundary condition sets the pressure gradient appropriately for buoyant flow. If the variable name is one of pd, p_rgh or ph_rgh, we assume that the pressure variable is $p - \rho(g \cdot h)$ and the gradient set using: $\nabla(p) = -\nabla_\perp(\rho)(g \cdot h)$ Otherwise we assume that it is the static pressure, and the gradient calculated using: $\nabla(p) = \rho(g \cdot n)$ From fixedFluxPressureFvPatchScalarField we see that: This boundary condition adjusts the pressure gradient such that the flux on the boundary is that specified by the velocity boundary condition. The predicted flux to be compensated by the pressure gradient is evaluated as $(\phi - \phi_{H/A})$, both of which are looked-up from the database, as is the pressure diffusivity used to calculate the gradient using: $\nabla(p) = \frac{\phi_{H/A} - \phi}{|Sf| D_p}$ wyldckat, zandi, eternityboy and 4 others like this.

 October 16, 2014, 04:21 #6 Senior Member     Fabian Roesler Join Date: Mar 2009 Location: Bad Friedrichshall, Germany Posts: 166 Rep Power: 8 Some additional remarks: The fixedFluxPressure boundary is known do have a better convergence. This is in my opinion due to the more pressure related calculation of the gradient: $\nabla(p) = \frac{\phi_{H/A} - \phi}{|Sf| D_p}$ phi and phiHbyA (predicted flux field) are directly linked to pressure equation. On a wall, the flux difference tends to zero and so the boundary condition turns to zeroGradient. The buoyanPressure boundary is more the physical method to describe the pressure gradient with Archimedes' principle. I hope my explanation is understandable and correct. Cheers Fabian wyldckat, zandi, LESlie and 6 others like this.

 November 5, 2014, 17:06 #7 Senior Member     Santiago Marquez Damian Join Date: Aug 2009 Location: Santa Fe, Santa Fe, Argentina Posts: 418 Rep Power: 15 Hi folks, I'm dealing with fixedFluxPressure BCs also and this thread was helpful. Checking the code things have changed at least in FOAM 2.3.0. The class definition is now more simple fixedFluxPressureFvPatchScalarField.C Code:  125 void Foam::fixedFluxPressureFvPatchScalarField::updateCoeffs 126 ( 127 const scalarField& snGradp 128 ) 129 { 130 if (updated()) 131 { 132 return; 133 } 134 135 curTimeIndex_ = this->db().time().timeIndex(); 136 137 gradient() = snGradp; 138 fixedGradientFvPatchScalarField::updateCoeffs(); 139 } it only sets the proper gradient in line 137 and then calls the updateCoeffs() method from the fixedGradientFvPatchScalarField class (from which the present class inherits). This requires to set the value of snGradp which is done at solver level. For example, from pEqn.H of interFoam we have: Code:  27 // Update the fixedFluxPressure BCs to ensure flux consistency 28 setSnGrad 29 ( 30 p_rgh.boundaryField(), 31 ( 32 phiHbyA.boundaryField() 33 - (mesh.Sf().boundaryField() & U.boundaryField()) 34 )/(mesh.magSf().boundaryField()*rAUf.boundaryField()) 35 ); From the new code the gradient reads: Hope this helps for 2.3.0 users. Regards. fabian_roesler, LESlie, PonchO and 5 others like this. __________________ Santiago MÁRQUEZ DAMIÁN, Ph.D. Post-doctoral Fellow Research Center for Computational Mechanics (CIMEC) - CONICET/FICH-UNL T.E.: 54-342-4511594 Ext. 1005 Güemes 3450 - (3000) Santa Fe Santa Fe - Argentina http://www.cimec.org.ar Last edited by santiagomarquezd; November 7, 2014 at 06:25. Reason: Add equation

 April 14, 2015, 16:46 #8 Senior Member   anonymous Join Date: Aug 2014 Posts: 178 Rep Power: 3 I would like to comment out a bit, why does OpenFOAM use the expression given by santiagomarquezd (gracias por el análisis del código fuente) for the pressure surface normal gradient in the boundaries. First of all we need to write down the momentum equation discretized using the Rhie-Chow interpolation method. This reads: Where the f subscript means interpolate to the face, is the variable p_rgh whose value is , and the vector u is the velocity. Now multiply the equation by the face surface vector where the vector n is the surface normal: Thus the following equation for the pressure surface gradient can be obtained: Hope this is useful for you foamers zandi, PonchO, mgg and 3 others like this.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Marcus Gellert (Gellert) OpenFOAM Running, Solving & CFD 17 December 14, 2010 16:06 fgal OpenFOAM Bugs 0 July 22, 2010 14:19 anger OpenFOAM Running, Solving & CFD 3 November 10, 2008 06:50 Cyril CFX 3 November 24, 2006 07:33 gilberto CFX 5 January 21, 2002 10:41

All times are GMT -4. The time now is 12:38.