CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Understanding p and p_rgh (https://www.cfd-online.com/Forums/openfoam-solving/230663-understanding-p-p_rgh.html)

Victor3 September 30, 2020 09:00

Understanding p and p_rgh
 
I’m having some trouble understanding p and p_rgh. I’ve set up a test case using buoyantPimpleFoam. I have an air inlet blowing cold air into a hot rom. There is also an outlet on the other side. When I look at the results p and p_rgh looks completely opposite to what I would expect. I thought p_rgh would show highest pressure close to the floor with air above. (Just like p is now)

Could anyone help me understand?

P_rgh:
https://ipfs.io/ipfs/QmVw6yjL5rebg9V...GRytDPiBksfjif



p:

https://ipfs.io/ipfs/QmVpiWHu8bxstk1...hYLPtdJoP83JxY


Files:
P:
Code:

  internalField  uniform 101325;
 
  boundaryField
  {
      rom
      {
          type            calculated;
          value          $internalField;
      }
 
      pipes
      {
          type            calculated;
          value          $internalField;
      }
 
      inlet
      {
          type            calculated;
          value          $internalField;
      }
 
      outlet
      {
          type            calculated;
          value          $internalField;
         
      }
  }

P_rgh:
Code:

  nternalField  uniform 101325;
 
  boundaryField
  {
      inlet
      {
          type            fixedFluxPressure;
          gradient        uniform 0;
          value          uniform 101325;
      }
 
      outlet
      {
          type            fixedValue;
          value          uniform 101325;
      }
 
      pipes
      {
          type            fixedFluxPressure;
          gradient        uniform 0;
          value          uniform 101325;
      }
 
      rom
      {
          type            fixedFluxPressure;
          gradient        uniform 0;
          value          uniform 101325;
      }
 
  }


petros October 1, 2020 07:33

Hi Victor,

You should have a look at Guide: How to ask questions in the forum and How to give enough info to get help, otherwise it is so difficult to find help.

Secondly, the issue of p_rgh and p has been extensively discussed in the forum (e.g. 1, 2). Use Search to navigate through old posts. The answer is out there.

Best,
Petros

Victor3 October 1, 2020 09:51

Maybe my question was a little thin but you answered perfectly with the two links. Just what I was looking for. Thanks

Tobermory October 1, 2020 12:06

The following response from Henry gives a (tiny) little more information about his "enhanced buoyancy treatment" and p_rgh field, which is unique to OpenFOAM.

https://bugs.openfoam.org/view.php?id=1170

In a flow with constant density, then p_rgh should remove the vertical variation of pressure with height (like in your test case?) in the background flow. In a compressible gas, the same is approx true for small scales, but is clearly not true for atmospheric dispersion cases where some vertical variation in p_rgh will still occur ... just not as much.


All times are GMT -4. The time now is 13:03.