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

 June 5, 2019, 02:03 p_rgh advantage over p? #1 New Member   SAIKRISHNA N Join Date: Jun 2014 Posts: 10 Rep Power: 10 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.

 June 5, 2019, 11:51 #2 Senior Member   Michael Alletto Join Date: Jun 2018 Location: Bremen Posts: 611 Rep Power: 14 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

 June 5, 2019, 16:10 #3 Senior Member   Santiago Lopez Castano Join Date: Nov 2012 Posts: 354 Rep Power: 14 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.

June 6, 2019, 02:03
#4
Senior Member

Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 611
Rep Power: 14
Quote:
 Originally Posted by Santiago 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

June 6, 2019, 03:13
#5
Senior Member

Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 14
Quote:
 Originally Posted by mAlletto 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.

 June 6, 2019, 04:29 A perfectly Valid Buossinesq solver #6 Senior Member   Santiago Lopez Castano Join Date: Nov 2012 Posts: 354 Rep Power: 14 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

 June 6, 2019, 16:50 #7 Senior Member   Michael Alletto Join Date: Jun 2018 Location: Bremen Posts: 611 Rep Power: 14 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

June 6, 2019, 17:08
#8
Senior Member

Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 14
Quote:
 Originally Posted by mAlletto 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...

 Tags cfd, fvm, peqn, p_rgh