|
[Sponsors] |
Center of Gravity and Raise velocity of Bubble |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 14, 2017, 05:30 |
Center of Gravity and Raise velocity of Bubble
|
#1 |
New Member
Rajesh
Join Date: Sep 2017
Location: Israel
Posts: 6
Rep Power: 8 |
Hi Foamers,
I simulated raising bubble case proposed by Hysing et al. (http://www.karlin.mff.cuni.cz/~hron/...3/1934_ftp.pdf) in 2D using OpenFOAM 5.0. I would like to calculate the center of gravity as well as raise velocity of the bubble at different write time steps before getting on to my final time (t=3). I tried to use swak4FOAM to do this. But my FOAM version is 5.0 and I couldn't find it compatible. I am using paraFOAM for post processing. Help me out with some best possible way to calculate the C.G and raise velocity of bubble. Thanks in advance. |
|
September 14, 2017, 08:00 |
|
#2 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
Because the region is rectangular you may calculate the center of gravity simply form the alpha values with any kind of programming language:
- read they in - arrange it in rectangular form or get the line and row index from the vector - calculate y (and if you want x) coordinates - sum all the y coordinates and get the center of gravity May be in the form (simple C) Code:
// parts in x and y int xParts=150; int yParts=2*xParts; int index=-1; double x,y; double sx=0; double sy=0; int countXy=0; int countBorder=0; // 1 is water, 0 is air. for (int i=0;i<yParts;i++) { for (int j=0; j<xParts;j++) { double m=content[index]; index++; if (index>anzahl) error("something is wrong"); if (m<0.2) { // Air x=(double)j/xParts; x=x-0.5/xParts; y=2.0*i/yParts; y=y+1.0/yParts; // corrction to the middle of an element sx+=x;sy+=y;countXy++; } // Air else if (m<0.99) { // was dazwischen countBorder++; } } } printf("AvgX: %lf AvgY: %lf\n Borderelements: %d", sx/countXy, sy/countXy, countBorder);
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
September 17, 2017, 07:11 |
Resolved the problem
|
#3 |
New Member
Rajesh
Join Date: Sep 2017
Location: Israel
Posts: 6
Rep Power: 8 |
Thank you Uwe Pilz for your suggestion
I sorted out the problem. The volume fraction output file at each time step contains x-coordinate, y-coordinate and concentration values. These are utilized to calculate centroid and raise velocity of air bubble in water By default, all the commercial solvers and open source codes will consider 0 volume fraction as complete air and 1 volume fraction as complete water. One can change these values in reverse before running the case (But be careful while assigning properties to the two fluids as this also need to be reversed). Then get the output files and feed it into the self written code to calculate both the requirements. One can also do this during run time with SWAKE4FOAM. But openFOAM 5.0 don't support it. There is one more option called Functional Object that can incorporated in the control dictionary which writes the required values at each time step. If any one is familiar with this then let me know. I would like to implement this. |
|
February 20, 2020, 21:53 |
|
#4 | |
Senior Member
Nguyen Duy Trong
Join Date: Apr 2014
Posts: 124
Rep Power: 12 |
Quote:
Could you please share more idea on how to compute circularity of bubble. I am confusing on the way to compute it. Thanks |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Center of Gravity and Raise velocity of Bubble | Rajesh Nimmagadda | OpenFOAM Post-Processing | 0 | September 14, 2017 05:17 |