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/)
-   -   gradient term in buoyantBoussinesqPimpleFoam (https://www.cfd-online.com/Forums/openfoam-solving/221536-gradient-term-buoyantboussinesqpimplefoam.html)

randolph October 21, 2019 11:20

gradient term in buoyantBoussinesqPimpleFoam
 
In the buoyantBoussinesqPimpleFoam, the gradient of pressure and the density term is calculated as the following. In my understanding, the surface normal gradient is first calculated and then used to reconstruct the gradient.

Code:

  solve
        (
            UEqn
              ==
            fvc::reconstruct
            (
                (
                  - ghf*fvc::snGrad(rhok)
                  - fvc::snGrad(p_rgh)
                )*mesh.magSf()
            )
        );

My question is why not just simply calculating the gradient as:
Code:

-fvc::grad(p_rgh)
Are these two approaches equivalent? If not, why is the first approach better than the second?

Thanks,
Rdf


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