CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Rise of a spherical bubble terminal velocity (https://www.cfd-online.com/Forums/openfoam-solving/58449-rise-spherical-bubble-terminal-velocity.html)

sega May 20, 2008 09:20

Hello. Now I'm getting to m
 
Hello.

Now I'm getting to my next problem:
The rise of sperical bubble to it's terminal velocity.

I used the test-setup described in http://test.interface.free.fr/Case01.pdf

Unfortunately there is nothing about the boundary conditions in this case.
As the boundary should not have an influence on the shape and even on the terminal veloctiy (if the computational domain is large enought), i chosed the following:

left: symmetryPlane for all values (U,pd,gamma) (I use an axisymmetric description
top: totalPressure (0) for pd, uniform (0 0 0) for U, zeroGradient for gamma
left & bottom: zeroGradient for pd and gamma, uniform (0 0 0) for U

To initialize the bubble I used funkySetFields to create a gamma-field at the center of the domain. Here is the image:

http://www.cfd-online.com/OpenFOAM_D...ges/1/7745.png

I used the same function to initialize the pressure inside the bubble to the value defined by sigma/radius:

http://www.cfd-online.com/OpenFOAM_D...ges/1/7746.png

Transport Properties were taken from the test-case description mentioned above.

Sounds bad, but it's real: the solver is doing nothing:


Exec : interFoam . .
Date : May 20 2008
Time : 15:16:11
Host : M1530
PID : 6392
Root : /home/sega/OpenFOAM/sega-1.4.1/run/rise
Case : .
Nprocs : 1
Create time

Create mesh for time = 0


Reading environmentalProperties
Reading field pd

Reading field gamma

Reading field U

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Calculating field g.h

time step continuity errors : sum local = 0, global = 0, cumulative = 0
#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&)

So, there must be something wrong.
Any ideas?

My OpenFOAM-case is located here:
http://therealsega.th.funpic.de/openfoam/rise.tar.gz

sega May 21, 2008 11:07

My first setup was really bad.
 
My first setup was really bad.

I have done this now:
- used the complete computational domain (no symmetry)
- boundary-condition:
U: 0 at the bottom, zeroGradient at all other sides
pd: totalPressure 0 at the top, zeroGradient at all other sides
gamma: zeroGradient at all sides

I initialized the bubble as a sphere of defined radius and defined pressure inside.

All other transportProperties were chosen as in the literature mentioned above.

The simulation is running, but is not computing as I have planned.

- The bubble does not reach the "spherical cap sized" shape. It's more "skirted" at the sides.
Is that due to wall effects (actually there is no wall to the sides)?
Maybe I have to increade the computational domain?

http://www.cfd-online.com/OpenFOAM_D...ges/1/7774.png

The bubble is rising very slowly.
The image from above is after 30s Simulation time.
From the literature the bubble should reach its final shape and terminal velocity round about 0.1 Seconds ...

sega May 22, 2008 01:36

Ok, of course I have chosen th
 
Ok, of course I have chosen the wrong transportProperties, and size of the initial bubble. Thats why the bubble was rising too slow and getting "out of shape".

So, now that I did a check on all the numbers, there is another problem.

The bubble is starting to disperse at the skirts.

http://www.cfd-online.com/OpenFOAM_D...ges/1/7782.png

I have read about this phenomena in "Bubbles, Drops and Particles" (Clift, Grace, Weber. 2005)

Do I have to chose an even smaller mesh-size to stop the bubble from further "divergence"?

sega May 22, 2008 01:38

And now for the harder part:
 
And now for the harder part:

How can I compute the actual rising velocity over time?

ngj May 22, 2008 03:41

Hi Sebastian It looks nice.
 
Hi Sebastian

It looks nice. I do not know how to calculate the rising velocity. With respect to the dispersing bubble, I would try trial'n'error with a couple of different resolutions and see what happens.

- Niels

hjasak May 22, 2008 03:56

Hello, Do you know about th
 
Hello,

Do you know about the PhD Thesis from Henrik Rusche:

Rusche, H: Computational fluid dynamics of dispersed two-phase flows at high phase fractions, Imperial College, University of London 2003.

He has done a bunch of free-rising bubble simulations in 3-D.

Incidentally, how big is your bubble? In 2-D it will only have approx half the curvature of a 3-D bubble, which will cause some break-up.

Enjoy,

Hrv

sega May 22, 2008 04:42

Dear Hrv. The complete setu
 
Dear Hrv.

The complete setup is described in http://test.interface.free.fr/Case01.pdf

So, I used a spherical bubble of 0.02m diameter.

An I have just downloaded the PhD from Henrik Rusche. I will have a look into it.

@Niels: I will try some finer meshes later!

Get back to you!

sega May 23, 2008 05:08

I had a look into the PhD Thes
 
I had a look into the PhD Thesis.
It's consistent with the other theoretical works I have read.

What I'm still missing is a way of calculating the rise-velocity.
The OpenFOAM-PostProcessing is still a mystery to me.

sega May 23, 2008 06:40

I have set up a finer mesh by
 
I have set up a finer mesh by now and the simulation is running.
The error between estimated and calculated liquid phase volume fraction is at 0.9 %.
So I think the mesh is "good" enough.

I have checked the results during the calculation and the bubble seems to be somehow "dented" at the apex.

If you have a closer look at the mesh in this area you can see that it is finer there in an "uneven" way.
I was not aware of this fact.
Is it possible, that the mesh is causing this trouble?

Maybe I should consider creating a more "balanced" mesh in this area concerning the grid spaces.

http://www.cfd-online.com/OpenFOAM_D...ges/1/7793.png

P.S. With increasing calculation time the bubble is getting more thinner at the center line:

http://www.cfd-online.com/OpenFOAM_D...ges/1/7794.png

I don't think thats good ...

sega May 23, 2008 06:51

The bubble split up ... htt
 
The bubble split up ...

http://www.cfd-online.com/OpenFOAM_D...ges/1/7796.png

Looks like a smilie to me http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

sega May 25, 2008 19:00

Now I could performe a full si
 
Now I could performe a full simulation.

The terminal velocity is reached without significant "overshot".

Have a look:
http://www.cfd-online.com/OpenFOAM_D...s/mime_pdf.gif terminalvelocity.pdf

The shape is pretty good, allthought the bubble is still dispersing a little bit.

http://www.cfd-online.com/OpenFOAM_D...ges/1/7811.jpg
http://www.cfd-online.com/OpenFOAM_D...ges/1/7812.jpg

BUT: First and graves problem:
Compared to the literature the value of my terminal velocity is over 20% too low ...

sega May 26, 2008 13:50

Hello. I received a questio
 
Hello.

I received a question about how I calculated the terminal velocity.

I have used a post-processing tool I got from the university. I don't know in detail where it comes from, but it was really useful:

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif barycenter.zip

The tool calculates the location of the mass center of the phase gamma=0 at each timestep.

I tun the tool over my case and put the results into a file named 'center'.

barycenter . . >center

Then I picked the times and positions of the masscenter and calculate the displacement over time which is representing the rising velocity.

Greetings. S.

sega May 28, 2008 02:28

How is it possible to get some
 
How is it possible to get some numbers for the radius of the final shape?

ngj May 28, 2008 03:46

Hi Sebastian What do you me
 
Hi Sebastian

What do you mean with radius? If you can find the periphery in some way as a function of a parameter t, you can easily find the radii of curvature as a function of t.
I would probably import the data in matlab and then find the curve.

- Niels

sega May 28, 2008 11:24

Yes, I'm talking about the cur
 
Yes, I'm talking about the curvation of the top front of the bubble.

I don't know how to export these things into MATLAB or similar.

Does anybody know, how this can be done?

Meanwhile I have used a different setup to calculate another bubble.
This time I used the properties of an airbubble in water - I have experimental data for these setups.

Unfortunately the bubble is starting to break up again. Any ideas how I can prevent this?

Have a look at the shape:
http://therealsega.th.funpic.de/openfoam/airbubble.jpg

ngj May 28, 2008 12:16

Hi Sebastian You have your
 
Hi Sebastian

You have your gamma field, and if you put that together with the informations contained in the files in the polyMesh-directory, you should be able to piece together a set of (x,y,z,gamma)-arrays.

It takes some thinking, especially with piecing the coordinate information together, but it is definitely doable.

/ Niels

sega May 28, 2008 13:33

Well, thats a lot of work. Bu
 
Well, thats a lot of work.
But maybe I will try it.

Now, that the caluclation is finished I have some depressing results. The bubble broke up just about the end of the calculation:

http://www.cfd-online.com/OpenFOAM_D...ges/1/7846.png

And there is some variation in the rising velocity:

http://www.cfd-online.com/OpenFOAM_D...s/mime_pdf.gif tvairwater.pdf

Taking the mean of the rising-velocity I'm round about the 20 % error I allready experienced with the first caluclation.

My next step will be a calculation of a smaller bubble of about 1 mm diameter. There should be no signifcant deformation and a rectilinear rise-path.

sega May 29, 2008 14:38

Dam it, this is not working.
 
Dam it, this is not working.

I have tried different set-ups now, but this is still not working.

The test case with a 20mm diameter bubble described in the literature yields 20% error.

http://www.cfd-online.com/OpenFOAM_D...s/mime_pdf.gif Testcase_400x200_de20mm.pdf

A 20mm diameter bubble in water has about 20 % error as well

http://www.cfd-online.com/OpenFOAM_D...s/mime_pdf.gif water_de20mm.pdf

A 2mm diameter bubble in water about 30 % error.

http://www.cfd-online.com/OpenFOAM_D...s/mime_pdf.gif water_de2mm.pdf

A 1mm diameter bubble in water is zickzacking in a transversal direction and the rise velocity is oscillating. So I can't really tell the terminal velocity. Funny thing: Helical paths are restricted to bubble of higher diameter ...

http://www.cfd-online.com/OpenFOAM_D...s/mime_pdf.gif water_de1mm.pdf

It dawns me, that my results are void, because I'm doing 2D simulations.
What do you think? I'm comparing wrong ...?

ngj May 29, 2008 16:25

Hi Sebastian I have discuss
 
Hi Sebastian

I have discussed a lot with you, but this has become to subject specific, thus I will not be able to help you any further.

Good luck,

Niels

sega June 3, 2008 13:51

Hello again. I revised the
 
Hello again.

I revised the whole case of the rising bubble.
My first setup was complete crap!
I did completely wrong trying to compute in plane 2D.

Now I did a calculation on a axisymmetric 2D mesh and the results look pretty good.

http://www.cfd-online.com/OpenFOAM_D...s/mime_pdf.gif risevelocity.pdf

BUT: As you may see, the bubble reaches the desired terminal velocity after the overshot, but is gaining speed after about 0.25 seconds.

Any ideas, why this is happening?

Greetings so far.

sega June 4, 2008 13:54

Update on the case. The veloc
 
Update on the case.
The velocity gradient mentioned above was due to boundary influence.

With a slightly bigger geometry the result is within 1.4 % error of the estimated value of the terminal velocity.

http://www.cfd-online.com/OpenFOAM_D...s/mime_pdf.gif risevelocity.pdf

ngj June 6, 2008 03:44

Hi Sebastian I have just fo
 
Hi Sebastian

I have just found a tool called sampleSurface, where you can extract isoSurfaces. Look in the template-dict in

~/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/miscellaneous/sa mpleSurface.

Have a nice weekend,

Niels

azman October 20, 2008 14:32

Hi all, sebastian, thanks
 
Hi all,

sebastian, thanks for sharing your case in this forum. at least I know now what to look out when simulating rising bubbles with InterFOAM. I have been playing around with the InterFOAM solver for about 2 weeks now, and was toying with the idea of solving the concentration field of oxygen bubble rising in water using InterFOAM.

I am not sure whether you or anyone have ever tried it.

The first strategy that came to my mind was ..just adding the scalarTransport equation (just like how it was defined in the ScalarTransportFoam) in my InterFoam solver, after the gamma equation and velocity equation is solved.

solve
(
fvm::ddt(C)
+ fvm::div(U, C)
- fvm::laplacian(DT, C)
);
with DT = gamma*D02_liquid + (1-gamma)*DO2_air

I am however not sure how I can include a jump condition at the interface, such that CO2_liquidinterface = HenrysKoeff*C02_gasinterface. I fear that this is not possible with the VOF method since VOF doesnt track the interface per se, but just the vol. fraction of each cell, and magically reconstruct the interface. Am I right?

I recently came across a paper from Bothe et al., about direct numerical simulation of mass transfer between rising bubbles and the surrounding liquid that can be accessed through the link below.

http://chemie.uni-paderborn.de/fileadmin/chemie/Arbeitskreise/Warnecke/Literatur /bubblyflows.pdf

In their work with a self-built fvm code, the VOF method was used too, with the PLIC method to reconstruct the interface. The scalar transport equation was solved as follows:

Inside each phases:
dC'/dt + div(C'*u) = DT.grad(C')

whereby C' = C_liq at the liquid phase
C' = C_gas/H at the gas phase
DT (as above)

at the interphase:
C'_L = C'_G
D02_liquid*grad(C').n = H*D02_Gas*grad(C').n

Does anyone know what to include in the solver, such that the condition at the interphase is fulfilled.

isabel June 26, 2009 07:19

How do you use fundySetFields?
I want to define a spherical bubble of radio 0.001 and center 0,0 and I have typed:

funkySetFields . . -field gamma -expression 0 -time 0 -keepPatches -condition "pow(pos().x,2) + pow(pos().y,2) < pow(0.001,2)"

But I received this error:

bash: funkySetFields: command not found

ngj June 26, 2009 07:22

Search this forum, and you will find the place, where it can be downloaded as an add-on to OF. Further you will find a thorough wiki on the subject.

Best regards,

Niels

brugiere_olivier July 6, 2009 08:11

Hi all,

I have a bubble and I would like make the same graph than Sebastian. I have find the velocity 's maximun. But now I would like find the cell where this velocity is localise.

Thank's for your help

Olivier

sega July 6, 2009 09:05

Quote:

Originally Posted by brugiere_olivier (Post 221589)
Hi all,

I have a bubble and I would like make the same graph than Sebastian. I have find the velocity 's maximun. But now I would like find the cell where this velocity is localise.

Thank's for your help

Olivier

I have chosen the center of of the bubble for my plots.

brugiere_olivier July 7, 2009 02:25

Thank's to your help, but how do you find the center of the bubble ?
Because I can't fetch your archive barycenter.zip

sega March 3, 2010 16:11

Oh, this has been far in the past.
I was stumbling about your question just today.
Unfortunately I can't fetch the file for myself and I have lost it due to some system error ...

Can anyone post it again?

isabel March 4, 2010 02:42

Hi sega,

There is a paper in which is defined the rise velocity: "Thermocapillary motion of deformable drops and bubbles" by Hermann, Lopez, Brady and Raessi.
In this paper, the equation (3.2) is used to compute the rise velocity of a bubble.

bita.kh January 30, 2011 04:39

rising bubble
 
hi all

i simulate rise of spherical bubble with interfoam,but i can't open cases in this forum,can anyone help me?:)

sega January 30, 2011 05:10

1 Attachment(s)
Quote:

Originally Posted by bita.kh (Post 292806)
hi all

i simulate rise of spherical bubble with interfoam,but i can't open cases in this forum,can anyone help me?:)

If by "Case" you mean "Thread", try to use the "New Thread" button. :)

duongquaphim September 27, 2011 09:01

Hi Sebastian,

I saw in the first post that you used symmetryPlane with interFoam but you found some problems. Did you find ways to fix it? I am also facing problems with using symmetryPlane in interFoam as in my post http://www.cfd-online.com/Forums/openfoam-solving/92524-strange-pressure-behaviour-symmetricplane-boudary-condition-interfoam.html.

I hope to hear your comments on this.

Regards,

Duong

srikanth_b October 26, 2011 13:39

numerical dispersion in OpenFoam
 
hi Sebastian,
I am a student (new to OpenFoam) and am working on studying the rise behavior of bubbles in sheared liquids. I am using a 3D case without axial symmetry and am simulating flow in a linearly sheared rectangular column.
Due to the large size of the column I am unable to use a mesh with a resolution greater than 10 cells per diameter. I am also facing the same problem of smearing in testcases as fine as 15 cell per diameter.Have you found a way of resolving this.

P.S. I am also working in Fluent and the same mesh works perfectly without any smearing.Is this an advantage of PLIC over Interface compression ?
In anticipation of your reply
Regards

kmooney November 1, 2011 12:12

There is a good comparison of the performance of various reconstruction methods here if your interested:
Volume Tracking Methods for Interfacial Flow Calculations, Murray Rudman 1997. International journal for numerical methods in fluids.

I'm guessing the PLIC is saving you from poor interface resolution in the Fluent cases. Unfortunately it's not currently implemented in OpenFOAM although I believe there are some people working on it for structured hex meshes.

Hrushi November 19, 2011 08:26

barycenter and drop rise velocity
 
Quote:

Originally Posted by sega (Post 205371)
Hello.

I received a question about how I calculated the terminal velocity.

I have used a post-processing tool I got from the university. I don't know in detail where it comes from, but it was really useful:

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif barycenter.zip

The tool calculates the location of the mass center of the phase gamma=0 at each timestep.

I tun the tool over my case and put the results into a file named 'center'.

barycenter . . >center

Then I picked the times and positions of the masscenter and calculate the displacement over time which is representing the rising velocity.

Greetings. S.

Hi Sebastian,

I am able to simulate drop rise velocity using interFoam solver. Then I ran barycenter utility as posted above successfully.
I am now stuck at how to extract the time and barycenter coordinate (say in .xy format)?
So that I can calculate instantaneous drop rise velocity over a time.

How did you pick the times and position of the masscenter from center file generated using barycenter utility?

Hrushikesh

sega January 7, 2012 04:03

Quote:

Originally Posted by Hrushi (Post 332772)
Hi Sebastian,

I am able to simulate drop rise velocity using interFoam solver. Then I ran barycenter utility as posted above successfully.
I am now stuck at how to extract the time and barycenter coordinate (say in .xy format)?
So that I can calculate instantaneous drop rise velocity over a time.

How did you pick the times and position of the masscenter from center file generated using barycenter utility?

Hrushikesh

Well I used
Code:

barycenter > center
to produce an output file "center", deleted everything i didn't want manually and imported the data with MATLAB ...

A.J.Chaves August 21, 2012 10:53

Barycenter utility
 
Hello

I am new here in the forum and I have been working with the same case of the bubble rising. I'm using interDyMFoam and an parallel processing to simulate the case. Now I want to calculate the barycenter of the bubble so I can get the velocity in each step of time. I downloaded the barycenter utility, but when I try to install it, an erro message occurs.

ana@ana:~/OpenFOAM/OpenFOAM-2.1.0/applications/utilities/postProcessing/barycenter$ wmake
Making dependency list for source file barycenter.C
could not open file readEnvironmentalProperties.H for source file barycenter.C
SOURCE=barycenter.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/transportModels -I/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/transportModels/incompressible/lnInclude -I/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/transportModels/interfaceProperties/lnInclude -I/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude -I/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/barycenter.o
barycenter.C:49:44: error: readEnvironmentalProperties.H: Arquivo ou diretório não encontrado
In file included from barycenter.C:52:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:92: error: ‘g’ was not declared in this scope
In file included from barycenter.C:55:
/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/setInitialDeltaT.H:35: error: ‘CoNum’ was not declared in this scope
/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:3: warning: unused variable ‘nOuterCorr’
/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:6: warning: unused variable ‘nCorr’
/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:12: warning: unused variable ‘momentumPredictor’
/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:15: warning: unused variable ‘transonic’
make: ** [Make/linux64GccDPOpt/barycenter.o] Erro 1
ana@ana:~/OpenFOAM/OpenFOAM-2.1.0/applications/utilities/postProcessing/barycenter$

I'm also a new user of the linux system but I guess the erro occurs because I'm using an new version of the OpenFoam (2.1.0) instead the original one that the utility were made for.
If anyone could help me, I would be grateful.

Hrushi August 22, 2012 01:09

Quote:

Originally Posted by A.J.Chaves (Post 378000)
barycenter.C:49:44: error: readEnvironmentalProperties.H: Arquivo ou diretório não encontrado
In file included from barycenter.C:52:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:92: error: ‘g’ was not declared in this scope
In file included from barycenter.C:55:
/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/setInitialDeltaT.H:35: error: ‘CoNum’ was not declared in this scope
/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:3: warning: unused variable ‘nOuterCorr’
/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:6: warning: unused variable ‘nCorr’
/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:12: warning: unused variable ‘momentumPredictor’
/home/ana/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:15: warning: unused variable ‘transonic’
make: ** [Make/linux64GccDPOpt/barycenter.o] Erro 1
ana@ana:~/OpenFOAM/OpenFOAM-2.1.0/applications/utilities/postProcessing/barycenter$

I'm also a new user of the linux system but I guess the erro occurs because I'm using an new version of the OpenFoam (2.1.0) instead the original one that the utility were made for.
If anyone could help me, I would be grateful.

Hi Angelo,

Yes, you are right. You need to make some minor changes in that code. I had done it a year back. I will have to look into my old files. If I get it, I will upload it here asap.:)

Hrushi September 21, 2012 14:24

baryCenter
 
1 Attachment(s)
Hi Angelo & Tayo

Here is the updated version of baryCenter baryCenter-of201.zip utility. I have tested it on OpenFoam-201. You can comapre the each file in zip archive with one that you have to recognise the changes one needs to make it usable in OF201.

Hope it helps.

Regards
Hrushi


All times are GMT -4. The time now is 06:35.