CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Gravity & pressure handle in interFoam (https://www.cfd-online.com/Forums/openfoam-programming-development/117924-gravity-pressure-handle-interfoam.html)

dav.dap83 May 17, 2013 08:04

Gravity & pressure handle in interFoam
 
Dear all,

I am currently trying to compile an interFoam version with kinematicCloud object inside.

However, there is an aspect I don't understand, namely how interFoam handles pressure and gravity. As far as I understand, in interFoam, gravity term does not compare in NS equations in UEqn.H, but a modified pressure p = p_rgh + rho*gh is introduced in createFields.H.

I performed a simple simulation of a laminar pipe single-phase flow with transverse gravitational fields, and compared the qualitative output with a similar simulation in pimpleFoam. A relevant difference appears, namely interFoam seems to ignore transverse gravitational field.

Do you know what is the reason of this different handling of gravity field? And what may cause the difference in the simulations' behaviors?

Thank you :)

kwardle May 22, 2013 10:52

You are correct in that interFoam uses a different formulation for pressure, but it also does define a field p with the 'normal' pressure and should work fine with kinematicCloud particle fields. And it should not ignore gravity. Have you verified in constant/g that gravity vector is defined as you intend? I ask because I forget this all the time and copy in a g file from a 2D run and find out a day later that my results are garbage because I forgot to correct the gravity vector direction.
-Kent

dav.dap83 May 22, 2013 11:21

constant/g was ok, but boundary conditions for pressure were wrong. Thank you anyway :)


All times are GMT -4. The time now is 22:02.