CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

p_rgh advantage over p?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By SAIKRISHNA N

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 5, 2019, 02:03
Question p_rgh advantage over p?
  #1
New Member
 
SAIKRISHNA N
Join Date: Jun 2014
Posts: 10
Rep Power: 11
SAIKRISHNA N is on a distinguished road
Hi Foamers,
I am studying numerics of FVM and CFD recently from various references in the context of its implementation in OpenFOAM.

I would like to understand the advantage of using p_rgh field for pEqn over 'p' field. At, https://www.openfoam.com/documentati...orm-p-rgh.html
it was mentioned to have numerical advantages. Can you please let me know what are those advantages?


Thank you
minh khang and vivek05 like this.
SAIKRISHNA N is offline   Reply With Quote

Old   June 5, 2019, 11:51
Default
  #2
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
the advantage is the gradient of p_rgh and rhok can be discretized in the same way. For the case of a resting fluid the pressure gradient and the bouncy force should be in equilibrium. In the implantation in OF this is true as well in the cell centers as on the faces.

If the bouncy force is treated as source term this is not the case. If you look in the book "the finite volume method in computational fluid dynamics" of Moukalled, Mangani and Darwish you'll find some more detail.

Best

Michael
mAlletto is offline   Reply With Quote

Old   June 5, 2019, 16:10
Default
  #3
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Such advantage is just conventional. You could perfectly work with the dynamic pressure and the buoyancy term for the fluctuations over a statistical mean. That is, hydrostatic pressure of the background fluid balances exactly the MEAN defect buoyancy force. Therefore, you can just resolve for the fluctuations of density around said mean, using the dynamic pressure (understood as the thermodyn pressure minus the hydrostatic one).

In short: there is no such thing as a numerical 'advantage' in using one or other formulation. It's just more "confortable" when working with thermodynamic quantities.
Santiago is offline   Reply With Quote

Old   June 6, 2019, 02:03
Default
  #4
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
Quote:
Originally Posted by Santiago View Post
Such advantage is just conventional. You could perfectly work with the dynamic pressure and the buoyancy term for the fluctuations over a statistical mean. That is, hydrostatic pressure of the background fluid balances exactly the MEAN defect buoyancy force. Therefore, you can just resolve for the fluctuations of density around said mean, using the dynamic pressure (understood as the thermodyn pressure minus the hydrostatic one).

In short: there is no such thing as a numerical 'advantage' in using one or other formulation. It's just more "confortable" when working with thermodynamic quantities.
What do you mean with more comfortable? Can you give an example?


Michael
mAlletto is offline   Reply With Quote

Old   June 6, 2019, 03:13
Default
  #5
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
What do you mean with more comfortable? Can you give an example?


Michael
Well, if you were to study Rayleigh-Benard convection in a cavity you would scale the temperature around the difference between the cold and hot plates. Dimensional scaling would defeat the purpose of having p_rhg. Sometimes people feel more confortable working with dimensions, however ineffective it is as for interpretation of the results obtained

Examples of a working code? There used to be a boussinesqPisoFoam in v 1.5 that didnt consider p_rgh.
Santiago is offline   Reply With Quote

Old   June 6, 2019, 04:29
Default A perfectly Valid Buossinesq solver
  #6
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Code:
 //...            
          fvVectorMatrix UEqn
          (
              fvm::ddt(U)
           + fvm::div(phi, U)
           + turbulence->divDevReff() == f + (1.5*rho-0.5*rho.oldTime())*g
          );
//...
        fvScalarMatrix rhoEqn
        (
            fvm::ddt(rho)
        +  fvm::div(phi, rho)
        +  fvm::laplacian(Dk,rho)
        );
        rhoEqn.relax();
        rhoEqn.solve();
//...

Last edited by Santiago; June 6, 2019 at 04:30. Reason: beauty
Santiago is offline   Reply With Quote

Old   June 6, 2019, 16:50
Default
  #7
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
HM. But in this version the old time step value of rho is used. Probably to stabelise the solution since in this way very high changes in time are damped. With the actual Version this is not required. So I guess it is numerically more stable
mAlletto is offline   Reply With Quote

Old   June 6, 2019, 17:08
Default
  #8
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
HM. But in this version the old time step value of rho is used. Probably to stabelise the solution since in this way very high changes in time are damped. With the actual Version this is not required. So I guess it is numerically more stable
?

BoussinesqPimpleFoam treats the buoyant term explicitely. Via the fvm::reconstruct the buoyancy term is calculated at the cells faces and set explicitely in the momentum equation. So, au contraire, my version is a bit more "stable" when using implicit time discretizations...
Santiago is offline   Reply With Quote

Reply

Tags
cfd, fvm, peqn, p_rgh


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Main advantage of using Runge Kutta of higher order? jakubstary Main CFD Forum 14 August 20, 2019 16:15
does OpenFoam take advantage of 64bit OS? mihaipruna OpenFOAM Installation 2 March 21, 2012 16:10
What is advantage of SIMPLE algorithm? Geon-Hong Main CFD Forum 1 May 18, 2010 07:46
[GAMBIT] grid topology advantage agungwp ANSYS Meshing & Geometry 3 August 28, 2009 09:44
What happened to Advantage CFD? gocarts Main CFD Forum 0 February 6, 2007 13:01


All times are GMT -4. The time now is 06:27.