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/)
-   -   p_rgh advantage over p? (https://www.cfd-online.com/Forums/openfoam-solving/218024-p_rgh-advantage-over-p.html)

SAIKRISHNA N June 5, 2019 02:03

p_rgh advantage over p?
 
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

mAlletto June 5, 2019 11:51

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

Santiago June 5, 2019 16:10

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.

mAlletto June 6, 2019 02:03

Quote:

Originally Posted by Santiago (Post 735552)
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

Santiago June 6, 2019 03:13

Quote:

Originally Posted by mAlletto (Post 735564)
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 June 6, 2019 04:29

A perfectly Valid Buossinesq solver
 
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();
//...


mAlletto June 6, 2019 16:50

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

Santiago June 6, 2019 17:08

Quote:

Originally Posted by mAlletto (Post 735644)
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...


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