CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Simulation for a bubble rising from the bottom of water (http://www.cfd-online.com/Forums/openfoam-solving/112958-simulation-bubble-rising-bottom-water.html)

liguifan February 8, 2013 12:21

Simulation for a bubble rising from the bottom of water
 
Hi everyone,

Is there anybody can give me some hint on how to build up a model that can simulate the bubble rising in the water.

I can build up a sphere and a water container using Gmsh, however, I am not sure how to build up the water with Openfoam of Gmsh.

Any help will be appreciated!

liguifan February 8, 2013 16:22

I have tried the damBreak and CapillaryRise case in the tutorials but they are all about liquid-air or liquid-liquid interaction. Haven't found any information relative to the bubble rising

danvica February 8, 2013 16:34

Why is the damBreak case not good ? If the bubble is made of air you are in the liquid-air case. Just use that case using a different setfields dict. If you need tomorrow i can send you an example...
Btw you don't need Gmsh for this.

liguifan February 8, 2013 16:44

Quote:

Originally Posted by danvica (Post 406799)
Why is the damBreak case not good ? If the bubble is made of air you are in the liquid-air case. Just use that case using a different setfields dict. If you need tomorrow i can send you an example...
Btw you don't need Gmsh for this.

Hi Danvica,

Thanks for the reply! It sounds like I need to manipulate the setfields, which I am not too sure how to do, to create a spherical air space(bubble) within the liquid volume. Is that right?

If you can send me an example that would be great!

Although I need to extend it to a 3D case, this would be a good start.

Look forward to hearing from you!

danvica February 8, 2013 17:12

I will but maybe this post could help you: http://www.cfd-online.com/Forums/ope...tml#post330597

liguifan February 9, 2013 00:07

Quote:

Originally Posted by danvica (Post 406807)
I will but maybe this post could help you: http://www.cfd-online.com/Forums/ope...tml#post330597

Hi danvica,

Thanks for the thread you gave me, I followed the two possible ways of making this working.

1) I tried to install the funckySetField from
http://openfoamwiki.net/index.php/Co...funkySetFields
but the download link seems not working anymore
I installed svn on my Ubuntu and did "
svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Breeder_1.6/utilities/postProcessing/FunkySetFields/"
unfortunately, it said "couldn't open the requested SVN system"

2) I modified my setFieldsDict as
You can do that easily with setFields like

18 defaultFieldValues
19 (
20 volScalarFieldValue alpha1 0
21 );
22
23 regions
24 (
25 sphereToCell
26 {
27 centre (0.05 0.1 0.5);
28 radius 0.01;
29 fieldValues
30 (
31 volScalarFieldValue alpha1 1
32 );
33 }
34 );
on the thread you provided.
Then I do cp -r alpha1.org alpha1->setFields->interFoam
However, by using paraFoam to view the model, I only can see the square without any bubble or anything in it.

Please advice if I did anything wrong? Thanks!

danvica February 9, 2013 03:55

The setfieldsdict seems correct even if I usually set alpha=0 for air and alpha=1 for water.

In Parafoam you need to look for alpha field.

liguifan February 9, 2013 13:21

2 Attachment(s)
Quote:

Originally Posted by danvica (Post 406837)
The setfieldsdict seems correct even if I usually set alpha=0 for air and alpha=1 for water.

In Parafoam you need to look for alpha field.

By following your suggestion, the simulation works. Like the pictures here.
The second one is just after the simulation starts, the bubble bursts. But in real case, the bubble will rise to the surface of the water before it bursts? Even I change the size of the bubble to very small, it still bursts.

Sorry I forget to tell your my email address is: liguifan@gmail.com.
Thanks for that.

duongquaphim February 10, 2013 04:17

Looking at your picture, the BC seems strange. What do u use for BCs in your simulation?

liguifan February 10, 2013 16:42

Quote:

Originally Posted by duongquaphim (Post 406936)
Looking at your picture, the BC seems strange. What do u use for BCs in your simulation?

The boundary conditions are as follows

alpha1.org
Quote:

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
leftWall
{
type zeroGradient;
}

rightWall
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}

atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}

frontWall
{
type zeroGradient;
}
backWall
{
type zeroGradient;
}
}
p_rgh
Quote:

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
leftWall
{
type buoyantPressure;
value uniform 0;
}

rightWall
{
type buoyantPressure;
value uniform 0;
}

lowerWall
{
type buoyantPressure;
value uniform 0;
}

atmosphere
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
value uniform 0;
}

frontWall
{
type buoyantPressure;
value uniform 0;
}
backWall
{
type buoyantPressure;
value uniform 0;
}
}
U
Quote:

FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
leftWall
{
type fixedValue;
value uniform (0 0 0);
}
rightWall
{
type fixedValue;
value uniform (0 0 0);
}
lowerWall
{
type fixedValue;
value uniform (0 0 0);
}
atmosphere
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
frontWall
{
type fixedValue;
value uniform (0 0 0);
}
backWall
{
type fixedValue;
value uniform (0 0 0);
}
}
I modified the case to a 3D cube, but the same thing happens- bubble burst before it rise to the water surface. Even more wired, the liquid-water leaks out from one of walls-I think from letfWall. I am not sure where it goes wrong.

Kind regards,
James


All times are GMT -4. The time now is 09:57.