|
[Sponsors] |
July 27, 2013, 15:01 |
simpleFoam with gravity, based on interFoam
|
#1 |
Senior Member
Jon Elvar Wallevik
Join Date: Nov 2010
Location: Reykjavik, ICELAND
Posts: 103
Rep Power: 20 |
Dear Foamers
I have noticed now and then on this forum that there is some demand for simpleFoam with gravity I wanted to try this. First I tried to implement gravity directly into the UEqn.H and pEqn.H as already suggested in the forum. However, these let frequently to crashes, very much depending on boundary conditions used. Instead of the above, I rather tried to do the interFoam approach, which basically leaves the effect of gravity out of the equation. Remember that the effect of gravity in UEqn.H is in “- ghf*fvc::snGrad(rho)” and this term is only active at the interface between the two phases. That is, within the bulk of each phase, there is no gravity effect by UEqn() or p_rghEqn(). The approach of the interFoam is to add the effect of gravity by creating a new pressure term, named “p” (which is not solved) and given by “p == p_rgh + rho*gh” (see pEqn.H). Look at the code. You can see the changes by searching for the term “new addition”. The code is from OpenFOAM 2.2.x. Please remember that we are always working with kinematic pressure, thus there is no "rho" here (but you can add such a term if desirable). The solver: Y13M07D27_c_simpleFoamGravity.tgz Case example: Y13M07D27_b_pitzDailyGravity.tgz If you find any error, feel free to modify and post here. Hope this is of help anyway, cheers J. |
|
May 9, 2019, 11:08 |
|
#2 | |
Senior Member
Ali Shayegh
Join Date: Oct 2015
Posts: 131
Rep Power: 11 |
Quote:
Could u pls have a look on this post? SimpleFoam with body force gravity thank u in advance. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Boundary condition setting for adding gravity in simpleFoam | norkistar | OpenFOAM Programming & Development | 3 | June 15, 2022 05:20 |
interFoam vs. simpleFoam channel flow comparison | DanM | OpenFOAM Running, Solving & CFD | 12 | January 31, 2020 16:26 |
Gravity & pressure handle in interFoam | dav.dap83 | OpenFOAM Programming & Development | 2 | May 22, 2013 12:21 |
simpleFoam p field for interFoam p field | shyam | OpenFOAM Running, Solving & CFD | 3 | November 22, 2011 06:54 |
Moving from simpleFoam to interFoam with alpha = 0 | kjetil | OpenFOAM Running, Solving & CFD | 1 | November 8, 2009 21:04 |