CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   interFoam behavior due to gh*grad(rho) (https://www.cfd-online.com/Forums/openfoam/101562-interfoam-behavior-due-gh-grad-rho.html)

JonW May 7, 2012 17:09

interFoam behavior due to gh*grad(rho)
 
3 Attachment(s)
Dear foamers
Today I did something interesting with OF21x, and I think you should know about it (at least you who are using interFoam a lot).

I took the original damBreak case and slided the solution area downward into negative y-direction (basically adding -4 in blockMeshDict in the y direction). I also changed setFieldDict so the case is physically the same as the original one.
Both cases are in damBreakTest.gz (tar xzf damBreakTest.gz)

Note that the density for phase 1 is extremely high in both cases, but similar is obtained with normal density values (but the difference is less clear then). I am often using high density liquids thus this is relevant for me.

The point is that there is a difference between the two cases, and I belevie it is due to the gh*grad(rho) term (remember the "-gh*grad(rho)" term in the governing equation). For the original case, then gh<0 at the interface, while for the new case then gh>0. Now remember that the coordinate system is the same (i.e. y - axis points in the same direction for both the original and the new case). This means that for the original case the "-gh*grad(rho)" points in the same direction as "grad(rho)", meaning downwards. However, for the new case, "-gh*grad(rho)" points in opposite direction (i.e. upward), and thus the difference between the two cases. I think that the reason that the liquid (alpha1) is not going "up" for the new case, is other terms like the grad(eta) and surface tension (and perhaps other effects) are forcing it down.

Strictly speaking this is not a code error (in my opinion), it is just how the gh*grad(rho) behaves, and you (interFoam user) should be aware of this. The point is, make sure that the origin of the coordinate system is at the lowest point in your system (at least this is what I do).

Hope this is of help
If you find other reason for the above difference, and if I am wrong in my conclusions, please post :)

Bernhard May 8, 2012 04:01

In this bug-report, Henry Weller explains this issue:
http://www.openfoam.org/mantisbt/view.php?id=356

JonW May 8, 2012 08:56

Thanks for the info Bernhard,
appreciate this
J


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