CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   twoPhaseEulerFoam unphysical behaviour (https://www.cfd-online.com/Forums/openfoam-solving/104035-twophaseeulerfoam-unphysical-behaviour.html)

 GerhardHolzinger July 2, 2012 07:06

twoPhaseEulerFoam unphysical behaviour

4 Attachment(s)
Hello,

I am trying to simulate a bubble column. My domain is a simple box, partly filled with water.
At the center of a small patch on the bottom air is injected (alpha = 1, Ua = 0.12). Water velocity is zero at the walls and at the inlet.

What puzzles me is the fact that the water levels rises continuously. I would expect a small finite increase of the water level.

To run the case, run:

blockMesh
setFields
twoPhaseEulerFoam

The attached images are taken at T = 0 s, T = 6 s and T = 12 s.

As the amount of water should be constant the water level should not be increasing.

 GerhardHolzinger July 3, 2012 02:28

update

3 Attachment(s)
I did some reading and found this in H. Rusches thesis on page 116. There he discusses ways to solve the phase continuity equation.

On page 116 he discusses an approach by Spalding. It is about adding a new equation to guarantee boundedness. This new equation is

Code:

`alpha = alpha / (alpha + beta);`
I am not sure if boundedness was the reason for my problems, because alpha did not exceed unity.

Adding this equation solved the problem, but I have to confess, that I do not know why exactly I do not have this problem anymore.

Code:

```{     word scheme("div(phi,alpha)");     word schemer("div(phir,alpha)");     surfaceScalarField phic("phic", phi);     surfaceScalarField phir("phir", phia - phib);     if (g0.value() > 0.0)     {         surfaceScalarField alphaf(fvc::interpolate(alpha));         surfaceScalarField phipp(ppMagf*fvc::snGrad(alpha)*mesh.magSf());         phir += phipp;         phic += fvc::interpolate(alpha)*phipp;     }     for (int acorr=0; acorr<nAlphaCorr; acorr++)     {         fvScalarMatrix alphaEqn         (             fvm::ddt(alpha)           + fvm::div(phic, alpha, scheme)           + fvm::div(-fvc::flux(-phir, beta, schemer), alpha, schemer)         );         if (g0.value() > 0.0)         {             ppMagf = rUaAf*fvc::interpolate             (                 (1.0/(rhoa*(alpha + scalar(0.0001))))               *g0*min(exp(preAlphaExp*(alpha - alphaMax)), expMax)             );             alphaEqn -= fvm::laplacian             (                 (fvc::interpolate(alpha) + scalar(0.0001))*ppMagf,                 alpha,                 "laplacian(alphaPpMag,alpha)"             );         }         alphaEqn.relax();         alphaEqn.solve();         #include "packingLimiter.H"         // addition: option 2 from H. Rusches thesis         alpha = alpha / (alpha + beta);         beta = scalar(1) - alpha;         Info<< "Dispersed phase volume fraction = "             << alpha.weightedAverage(mesh.V()).value()             << "  Min(alpha) = " << min(alpha).value()             << "  Max(alpha) = " << max(alpha).value()             << endl;     } } rho = alpha*rhoa + beta*rhob;```
The attached images show alpha of the midplane. One can clearly see, that the water level remains where it is.

 sharonyue October 30, 2012 03:30

4 Attachment(s)
Quote:
 Originally Posted by GerhardHolzinger (Post 369431) I did some reading and found this in H. Rusches thesis on page 116. There he discusses ways to solve the phase continuity equation. On page 116 he discusses an approach by Spalding. It is about adding a new equation to guarantee boundedness. This new equation is The attached images show alpha of the midplane. One can clearly see, that the water level remains where it is.
Hi Foamers

I am doing the similar work with Gerhard.I wanna simulate a 2D tank partly filled with water. and the air was injected at the bottom.
Actually the twoPhaseEulerFoam‘s parameters are confusing me. so I download the case and change it into a 2D case. except that I didnot do anything.
Just as the picture showes. there is no bubble, but a bulk air like a squid......

how to handle that problem?

run:
fluentMeshToFoam fluent.msh
setFields
twoPhaseEulerFoam

 sharonyue November 2, 2012 22:28

3 Attachment(s)
Quote:
 Originally Posted by GerhardHolzinger (Post 369431) I did some reading and found this in H. Rusches thesis on page 116. There he discusses ways to solve the phase continuity equation. On page 116 he discusses an approach by Spalding. It is about adding a new equation to guarantee boundedness. This new equation is
hi GerhardHolzinger

I simulated lots of different situation and found that the rising water level is relevant to the size of inlet.

But I dont konw why. and Im not sure if this is relevant to the alpha equation.

you can see that the water level remains where it is in this group images.
but the water level rises in the last group image.

does anyone know why that happens?

btw , does the red part represent the big random air bubble?

 sharonyue November 2, 2012 22:29

4 Attachment(s)
the middle size of inlet

the water level is rising slowly

 sharonyue November 2, 2012 22:30

4 Attachment(s)
the small inlet
level is rising a little bit fast.

 GerhardHolzinger November 5, 2012 04:11

Did you add the equation I mentioned?

In OpenFOAM 2.1.x (some time after 2.1.1 came out) the two-phase solvers were adapted to use MULES. Now there is no problem with free water surfaces.

 sharonyue November 7, 2012 04:12

Quote:
 Originally Posted by GerhardHolzinger (Post 390255) Did you add the equation I mentioned? In OpenFOAM 2.1.x (some time after 2.1.1 came out) the two-phase solvers were adapted to use MULES. Now there is no problem with free water surfaces.
yeah, I upgrade it, its fixed.

I have a little question.

Alberto said in twoPhaseEulerFoam, there would be no bubbles. but why there are bubbles in the tutorials/bed2/ and bed/?

 GerhardHolzinger November 7, 2012 04:28

I think Alberto meant, the difference between an Euler-Euler and a VOF-approach.

In Euler-Euler all phases are distributed. You do not calculate single bubbles but a gaseous phase.
So when simulating a bubble column in an Eulerian-Framework, there are no bubbles. There are only phase 'a' and 'b'. One of them is water and the other one is air.
To consider the bubbly nature of air inside water, you have to provide a bubble diameter in your case setup. This is needed e.g. for the calculation of drag.
You solve the momentum equation for both water and air in all your domain. Additionally you solve a phase continuity equation that tells you, where your water and where your air is located. The field alpha is the volume fraction of the disperse phase.
So, if you are having a bubble column, alpha=0 means there is only water and alpha=1 means there is only air.
Air bubbles rising through water mean a value of alpha between 0 and 1. So, there are no actual bubbles. There is only a volume fraction in an Eulerian simulation.

You can play the same game with solid particles and air, then you can call it fluidized bed.

 sharonyue November 7, 2012 05:09

Well thank you for your detailed answer and the information you always provide.Gerhard Holzinger. but now I am still confused.

Quote:
 Originally Posted by GerhardHolzinger (Post 390734) Air bubbles rising through water mean a value of alpha between 0 and 1.
I dont know why the alpha is between 0 and 1 in a bubble, should it be 0?

Quote:
 Originally Posted by GerhardHolzinger (Post 390734) So when simulating a bubble column in an Eulerian-Framework, there are no bubbles.
its very weird that there are no bubbles in a bubble column, Im really lost......confused....

I want to simulate air injected in a stirred tank filled with high viscosity (about 2000cp)non-Newtonian fluid(xanthan gum), in experiment, I find there are numerous small air bubble (1mm) cause of the high viscosity,and many big bubbles breakup like boiling in the free water level.
see it here http://www.cfd-online.com/Forums/ope...eulerfoam.html

So in reality , we can see lots of big bubbles and numerous small bubbles.
just as you said, can i perceive that two-fluid model can not simulate big bubble?

 GerhardHolzinger November 7, 2012 05:25

3 Attachment(s)
Quote:
 Originally Posted by sharonyue (Post 390741) I dont know why the alpha is between 0 and 1 in a bubble, should it be 0? its very weird that there are no bubbles in a bubble column, Im really lost......confused.... ?
What I meant with "There are no bubbles" is, that you don't see any bubbles when you look on your results in paraView.

I attached some pictures. Two of them are from paraView, showing the same image, just with a different scale on the color-bar. The third picture is an image of nearly the same situation in an experiment.

You see in both cases a bubble plume rising. In the photo you hardly see any actual bubbles because the exposure time is too long. So rising bubbles result in a somehow blurred image of the mean bubble path.

The two images out of paraView show the mean values of alpha - the volume fraction of the air. In this images there are no bubbles, only values of alpha between 0 and 1. If in a cell the value of alpha is 0, then there are no bubbles in this cell.
If in a cell the value of alpha is 0.1, then there are bubbles rising through this cell, and the overall bubble volume is 0.1 times the cell volume.

 sharonyue November 7, 2012 06:13

2 Attachment(s)
Quote:
 Originally Posted by GerhardHolzinger (Post 390746) What I meant with "There are no bubbles" is, that you don't see any bubbles when you look on your results in paraView.
wow! thank you for that image...now I know why there is no bubble,

one last question.

in your experiment, the bubble is so small. normally if air was injected in water,there would be lots of big bubbles than yours(right?or I just make a common sense mistake?). did u add grille in the inlet?
if u dont add grille in the inlet, or enlagrge the inlet, just as the image with a small scale on the color-bar I attached.

maybe its bubbles?...

anyway,thanks for your extremely patience...I own you a favor~

 GerhardHolzinger November 7, 2012 07:52

The bubble size when air is injected into water depends on how you inject it. In my experiment air enters through a porous plate. Therefore, the bubbles are relatively fine. If air enters through a perforated plate with 1mm holes, then the bubbles are bigger.

 sharonyue April 14, 2014 21:02

It has been a long time,

To those who is confused to this unclear boundary of alpha in twoPhaseEulerFoam with interFoam.

Because in twoPhaseEulerFoam it uses two-fluid model. It means, in every cell, you can have air and water's velocity respectively. So these two phases are permeating with each other. Apart from this, because this two-fluid model is not surface tracking method like VOF. So it can not have a sharp phase boundary.

But why there are some "big bubbles"(in red) in this case? This is just becuase air's volume fraction is big such as 0.6 or 0.7. I mean, This is not big bubble. It can be seen as bubble cluster.

If Im wrong, please correct me.

 All times are GMT -4. The time now is 15:02.