CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

simpleFoam with gravity, based on interFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree7Likes
  • 7 Post By JonW

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 27, 2013, 14:01
Default simpleFoam with gravity, based on interFoam
  #1
Senior Member
 
Jon Elvar Wallevik
Join Date: Nov 2010
Location: Reykjavik, ICELAND
Posts: 103
Rep Power: 19
JonW will become famous soon enough
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.
Attached Files
File Type: gz Y13M07D27_b_pitzDailyGravity.gz (3.4 KB, 127 views)
File Type: gz Y13M07D27_c_simpleFoamGravity.gz (2.6 KB, 186 views)
JonW is offline   Reply With Quote

Old   May 9, 2019, 10:08
Default
  #2
Senior Member
 
Ali Shayegh
Join Date: Oct 2015
Posts: 130
Rep Power: 10
amuzeshi is on a distinguished road
Quote:
Originally Posted by JonW View Post
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.
Hi
Could u pls have a look on this post?
SimpleFoam with body force gravity
thank u in advance.
amuzeshi is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 04:20
interFoam vs. simpleFoam channel flow comparison DanM OpenFOAM Running, Solving & CFD 12 January 31, 2020 15:26
Gravity & pressure handle in interFoam dav.dap83 OpenFOAM Programming & Development 2 May 22, 2013 11:21
simpleFoam p field for interFoam p field shyam OpenFOAM Running, Solving & CFD 3 November 22, 2011 05:54
Moving from simpleFoam to interFoam with alpha = 0 kjetil OpenFOAM Running, Solving & CFD 1 November 8, 2009 20:04


All times are GMT -4. The time now is 05:46.