CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Rising bubble with interFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 19, 2012, 15:07
Default Rising bubble with interFoam
  #1
Member
 
Tayo
Join Date: Aug 2012
Posts: 94
Rep Power: 6
tayo is on a distinguished road
Hello Foamers,

Please I need your advice here. I'm doing a 2D simulation on rising bubble using interFoam. To simplify it for now, my boundary condition is zero velocity at inlet, zero pressure (p_rgh) on outlet and zero gradient for all other sides. Zero gradient also used on all sides of the alpha1. Volume fraction and pressure (p_rgh) inside is initialized with funkySetfField all identical to what was used in a previous trend.

Rise of a spherical bubble terminal velocity

Bubble position is initially placed at center of the 100 mm^2 domain. nCells is 260480. Time step is 1e-4s (adjustableTimeStep also activated). liquid and gas phases are water and air, gravity is set to (0 -9.81 0). surface tension is 0.0728. Infact, I only slightly modified the damBreak tutorial to set up this case. What else. During simulation, I noticed the pressure (p_rgh) inside the bubble jumps from what I initialized (sigma/radius) to about 150N/m2. It runs fine but here is the problem, the bubble fails to rise, infact it sinks like a free fall (~0.75m/s). I've also tried to run without initializing the pressure inside the bubble, and it still sinks. I've tried changing the bubble size too, (and also actually flipped the sign of the gravity-makes no sense though but it rises with the same mag. of velocity as it falls when g is negative). How do I get the bubble to rise (with negative g ofcourse)? I've run out of ideas. Could the problem be with this p_rgh? Please I need your help/advice
tayo is offline   Reply With Quote

Old   September 19, 2012, 16:17
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,208
Blog Entries: 1
Rep Power: 17
nimasam is on a distinguished road
Hi dear tayo
look at this paper:
http://psrcentre.org/images/extraimages/212129.pdf
nimasam is offline   Reply With Quote

Old   September 19, 2012, 17:09
Default
  #3
Member
 
Tayo
Join Date: Aug 2012
Posts: 94
Rep Power: 6
tayo is on a distinguished road
Quote:
Originally Posted by nimasam View Post
Hi nima. I can see you did DNS with Re up to 1000 using zerogradient bc for u and p. Did you use interFoam? My test case is a simplified version of the paper and but I'm testing with laminar for now. From the description of my case, is there anything I'm not doing right? how did you treat the p_rgh? Thanks
tayo is offline   Reply With Quote

Old   September 19, 2012, 22:32
Default
  #4
Member
 
Tayo
Join Date: Aug 2012
Posts: 94
Rep Power: 6
tayo is on a distinguished road
OK. I've tried my test case on bubbleFoam (one of the few solvers on OF 2.1.1 that still computes pressure as p0+rho*gh) and my bubble rises and behaves as expected. But I still need to use interFoam because it is easier to include the complexities of my cases in the interFoam solver (I'm a newbie to OF). Moreover, bubbleFoam solves Euler-Euler equation (continuity & momentum equations for each phase) which I don't desire. So back to my original question:

How do I include the effects of rho*gh to my pressure (p_rgh)? I honestly still don't see the importance of the change from p to p_rgh. Someone please reply. Thanks
tayo is offline   Reply With Quote

Old   September 19, 2012, 23:57
Default
  #5
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,208
Blog Entries: 1
Rep Power: 17
nimasam is on a distinguished road
Quote:
I can see you did DNS with Re up to 1000 using zerogradient bc for u and p. Did you use interFoam?
yes, i used the interFoam in OpenFOAM-1.6,
BC are mentioned there!, i guess i used fixed pressure for top and no slip for bottom of geometry
Quote:
My test case is a simplified version of the paper and but I'm testing with laminar for now. From the description of my case, is there anything I'm not doing right?
my simulation is laminar too, or in other word i solved laminar equation sets and "direct numerical simulation" is pointed out to interface evolution is calculated directly not means it is a turbulent flow!
Quote:
how did you treat the p_rgh? Thanks
using p-rgh you can apply pressure condition much more easily!
i guess, first you should refine your mesh, then you should apply the BC i mentioned above! meanse put BC zeroGradient for All variable
then put noSlip condition for velocity at the bottom and fixedPressure for top of your geometry
nimasam is offline   Reply With Quote

Old   September 20, 2012, 00:00
Default
  #6
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,208
Blog Entries: 1
Rep Power: 17
nimasam is on a distinguished road
Quote:
Originally Posted by tayo View Post
OK. I've tried my test case on bubbleFoam (one of the few solvers on OF 2.1.1 that still computes pressure as p0+rho*gh) and my bubble rises and behaves as expected. But I still need to use interFoam because it is easier to include the complexities of my cases in the interFoam solver (I'm a newbie to OF). Moreover, bubbleFoam solves Euler-Euler equation (continuity & momentum equations for each phase) which I don't desire. So back to my original question:

How do I include the effects of rho*gh to my pressure (p_rgh)? I honestly still don't see the importance of the change from p to p_rgh. Someone please reply. Thanks
durin runTime it adds rho*gh in its calcualtion, so if you just want to see the Pressure (p) not P-rgh, you just need to add p dictionary in your 0 folder and assign a calculated BC for it!
nimasam is offline   Reply With Quote

Old   September 20, 2012, 01:21
Default
  #7
Member
 
Tayo
Join Date: Aug 2012
Posts: 94
Rep Power: 6
tayo is on a distinguished road
Quote:
Originally Posted by nimasam View Post
yes, i used the interFoam in OpenFOAM-1.6,
BC are mentioned there!, i guess i used fixed pressure for top and no slip for bottom of geometry

my simulation is laminar too, or in other word i solved laminar equation sets and "direct numerical simulation" is pointed out to interface evolution is calculated directly not means it is a turbulent flow!

using p-rgh you can apply pressure condition much more easily!
i guess, first you should refine your mesh, then you should apply the BC i mentioned above! meanse put BC zeroGradient for All variable
then put noSlip condition for velocity at the bottom and fixedPressure for top of your geometry
Fixed pressure at outlet, no slip velocity at inlet and zero gradient on all other sides and alpha1 field is exactly what I first started with, yet the bubble sinks. My internalField for pressure was also same as outlet pressure. I've played around with different outlet pressure and I've also tried buoyantPressure BC. I think the problem is there is still no pressure gradient at all inside the domain except inside the bubble. That's how I knew that the rho*gh is missing and thus tried it on bubbleFoam.

As per adding a p file to my 0 dir, how do I add the rho*gh to it. I've tried it by specifying a random rho*gh value at outlet and internal field but it simply adds up but seems not to have any effect on the physics and the bubble still sinks. Think I might not be doing it right too but the point is how do I get buoyancy for my bubble? Thanks

Last edited by tayo; September 20, 2012 at 02:20.
tayo is offline   Reply With Quote

Old   September 20, 2012, 09:06
Default
  #8
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,208
Blog Entries: 1
Rep Power: 17
nimasam is on a distinguished road
i think you need refine your mesh, and recheck your gravity
i attached for you a test case
Attached Files
File Type: zip spherical.zip (24.6 KB, 221 views)
nimasam is offline   Reply With Quote

Old   September 20, 2012, 17:50
Default
  #9
Member
 
Tayo
Join Date: Aug 2012
Posts: 94
Rep Power: 6
tayo is on a distinguished road
Hi nima. I've fixed the issue and it's rising. The problem was not with the p_rgh as I earlier thought. Actually, defining either p_rgh or p does not not affect the behavior. Thank you.
tayo is offline   Reply With Quote

Old   September 21, 2012, 02:45
Default
  #10
Senior Member
 
Jens Klostermann
Join Date: Mar 2009
Posts: 117
Rep Power: 9
jens_klostermann is on a distinguished road
Hi tayo,

You can also check the wiki http://openfoamwiki.net/index.php/Tw...28two_cases%29 and the references therein.
jens_klostermann is offline   Reply With Quote

Old   September 21, 2012, 12:20
Default
  #11
Member
 
Tayo
Join Date: Aug 2012
Posts: 94
Rep Power: 6
tayo is on a distinguished road
Thanks. Now the issue is computing the bubble position / velocity at each time step.
tayo is offline   Reply With Quote

Old   September 21, 2012, 12:45
Default
  #12
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,208
Blog Entries: 1
Rep Power: 17
nimasam is on a distinguished road
hi tayo
look at here for swak4Foam
http://openfoamwiki.net/index.php/Contrib/swak4Foam

and its utilities : swakFunctionObjects or simpleSwakFunctionObjects
nimasam is offline   Reply With Quote

Old   September 26, 2012, 20:40
Default
  #13
Member
 
Tayo
Join Date: Aug 2012
Posts: 94
Rep Power: 6
tayo is on a distinguished road
Hi,

I'm a little confused using simpleSwakFunctionObjects or simpleFunctionObjects. Please I need enlightenment. Do I add the code to my case's controlDict file before or after running the case or do I activate it afterwards using a command just like it's done in funkySetFields? Does it prints out the averaged values or how do I obtain these values? Finding the average rise velocity for the bubble, do I need to define the initial position of the bubble? I really don't understand. I intend to try the code below for my 2d & 3d bubble. Thanks

U
{
type patchAverage;
functionObjectLibs
(
"libsimpleFunctionObjects.so"
);
verbose true;
patches
(
inlet
wall
outlet
);
fields (U);
}
tayo is offline   Reply With Quote

Old   September 26, 2012, 23:12
Default
  #14
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,208
Blog Entries: 1
Rep Power: 17
nimasam is on a distinguished road
These libraries are executing meanwhile run-time and printout the result, for this case you wrote above average o U in patches inlet, wall and outlet will be saved in folder U,
however, it will execute in each timestep iteration after all! calculations,
to calculate rise velocity of bubble, you should calculate the position of bubble gravity center in each time step
nimasam is offline   Reply With Quote

Old   September 28, 2012, 08:57
Default
  #15
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,971
Rep Power: 41
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by tayo View Post
Hi,

I'm a little confused using simpleSwakFunctionObjects or simpleFunctionObjects. Please I need enlightenment. Do I add the code to my case's controlDict file before or after running the case or do I activate it afterwards using a command just like it's done in funkySetFields? Does it prints out the averaged values or how do I obtain these values? Finding the average rise velocity for the bubble, do I need to define the initial position of the bubble? I really don't understand. I intend to try the code below for my 2d & 3d bubble. Thanks

U
{
type patchAverage;
functionObjectLibs
(
"libsimpleFunctionObjects.so"
);
verbose true;
patches
(
inlet
wall
outlet
);
fields (U);
}
functionObjects are executed during the run every time the time is incremented (at the end of a timestep). Depending on the options you set (with simple/swak usually "verbose true") they write to the screen.

Have a look at http://openfoamwiki.net/index.php/Co...unctionObjects and tell me which information you're missing
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 5, 2014, 04:49
Default Boundary Conditions
  #16
New Member
 
praveen kumar sharma
Join Date: Jun 2014
Posts: 17
Rep Power: 4
P Sharma is on a distinguished road
Hi,
As this problem is posted 2 yrs before so, I am expecting you already completed this in openFoam and I am new in openfoam I want to know that what are boundary condition you applied in side walls of the bubble rising problem in openFoam.
thank you.




Please I need your advice here. I'm doing a 2D simulation on rising bubble using interFoam. To simplify it for now, my boundary condition is zero velocity at inlet, zero pressure (p_rgh) on outlet and zero gradient for all other sides. Zero gradient also used on all sides of the alpha1. Volume fraction and pressure (p_rgh) inside is initialized with funkySetfField all identical to what was used in a previous trend.

Rise of a spherical bubble terminal velocity

Bubble position is initially placed at center of the 100 mm^2 domain. nCells is 260480. Time step is 1e-4s (adjustableTimeStep also activated). liquid and gas phases are water and air, gravity is set to (0 -9.81 0). surface tension is 0.0728. Infact, I only slightly modified the damBreak tutorial to set up this case. What else. During simulation, I noticed the pressure (p_rgh) inside the bubble jumps from what I initialized (sigma/radius) to about 150N/m2. It runs fine but here is the problem, the bubble fails to rise, infact it sinks like a free fall (~0.75m/s). I've also tried to run without initializing the pressure inside the bubble, and it still sinks. I've tried changing the bubble size too, (and also actually flipped the sign of the gravity-makes no sense though but it rises with the same mag. of velocity as it falls when g is negative). How do I get the bubble to rise (with negative g ofcourse)? I've run out of ideas. Could the problem be with this p_rgh? Please I need your help/advice[/QUOTE]
P Sharma is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
bubble rising problem swamysrikanth ANSYS Meshing & Geometry 3 May 31, 2016 11:09
Getting a concentration field around a bubble in InterFoam azman OpenFOAM Running, Solving & CFD 2 January 7, 2013 14:47
VOF single bubble rising velocity! Lincoln Main CFD Forum 3 April 10, 2012 10:04
interTrackFoam for rising bubble michielm OpenFOAM 3 March 6, 2011 13:27
bubble rising in a column swamysrikanth Main CFD Forum 2 September 27, 2010 08:59


All times are GMT -4. The time now is 13:58.