CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] calculate bubble velocity (https://www.cfd-online.com/Forums/openfoam-community-contributions/98032-calculate-bubble-velocity.html)

nimasam March 1, 2012 12:28

calculate bubble velocity
 
hi former
i guess, it should be possible to access a bubble velocity with swak4Foam
but i dont know how the procedure can be?
the procedure should be like that:

1) select all cells with alpha < 0.5
2) calculate the gravity center in each time step

any comment or suggestion?

gschaider March 1, 2012 14:10

Quote:

Originally Posted by nimasam (Post 347134)
hi former
i guess, it should be possible to access a bubble velocity with swak4Foam
but i dont know how the procedure can be?
the procedure should be like that:

1) select all cells with alpha < 0.5
2) calculate the gravity center in each time step

any comment or suggestion?

Why use a cutoff? that way you're going to get jumps in your result. Something like

"(pos()*vol()*(1-alpha1))/sum(vol()*(1-alpha1))"

(with an accumulation sum) might give you the center of the "non-fluid".Have a look at my presentation from the last workshop (you'll find it on the swak4Foam-page on the Wiki). Slide 76 has a similar application.

BTW: if you're interested in the velocity of the liquid interface then you might want to have a look at slide 155 where it s demonstrated how to calculate that with sampledSurfaces

arsalan.dryi May 24, 2016 14:56

Hi Foamers,

I'm doing a 3D simulation of two and three bubble rising using a modified interFoam solver and I need to bubbles centre position, velocity and surface area.

For a single bubble rising I used swak4Foam expressions for example for bubble centre position in Y as follows :
Code:

    bubbleCentreY
    {
        type swakExpression;
        valueType internalField;
        verbose true;
    variables (
    "Vol= sum (alpha1 < 0.5 ? vol() : 0);"
    "VolY= sum (alpha1 < 0.5 ? pos().y*vol() : 0);"   
    );       
    expression "VolY/Vol";
        accumulations (
        min       
        );

   
    }

Is there a way to compute two or three bubble properties in this manner?

Thanks in advance,
Best Regards,
Arsalan.

sadra2003 March 8, 2022 03:14

1 Attachment(s)
Hello all,

Thank you for the info you provided here.
I would be appreciative if you let me know your opinion. (I have attached my case)
I am also working on the terminal velocity of bubbles. Using the paraView, I measure the center of a bubble location in two successive time steps, then by deviding the displacement of the center of bubble to the time difference, I want to calculate the velocity. The problem is, the value that I gain is 50% lower than the reported values ​​in the literature. I am using a 2D mesh in openFoam 8 using interFoam.
The contents of my 0 folder are:

U file:

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

internalField uniform (0 0 0);

boundaryField
{
bottom
{
type noSlip;
}
outlet
{
type noSlip;
}
walls
{
type slip;
}
defaultFaces
{
type empty;
}
}


p_rgh file:
dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
bottom
{
type zeroGradient;
}

outlet
{
type zeroGradient;
}

walls
{
type zeroGradient;
}

defaultFaces
{
type empty;
}
}

alpha file:


dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
bottom
{
type zeroGradient;
}

outlet
{
type zeroGradient;
}

walls
{
type zeroGradient;
}

defaultFaces
{
type empty;
}
}


transportProperties file:

phases (air water);

air
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.5E-5;
rho rho [ 1 -3 0 0 0 0 0 ] 1.18;

}

water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 7.22E-7;
rho rho [ 1 -3 0 0 0 0 0 ] 995.7;

}

Thanks a lot.


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