|
[Sponsors] | |||||
Calculating bubble volume in rising bubble simulation |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Member
Venkat Ganesh
Join Date: May 2020
Location: Cincinnati, Ohio
Posts: 49
Rep Power: 7 ![]() |
I'm performing a rising bubble simulation and I'd like to calculate the bubble volume at each writeInterval. I went through some threads and programming guides and came up with a rough code. However I'm not sure how to implement that. I tried creating a function object from a copy of 'vorticity' and changed things around, but the compiler doesn't recognize mesh and alpha1 within the code. Can someone guide in this regard?
Also is there a way I can have the bubble volume written out in a separate text file/csv with just two columns containing time and bubble volume instead of writing it out within the time directory at each writeInterval? Code:
scalar vol;
scalar vol_tot_air = 0.0;
scalar r_ori = 0.0007505;
scalar h_ori = 0.001;
scalar vol_ori = 3.14*r_ori*r_ori*h_ori;
forAll(mesh.C(), celli) //Loop through all cells
{
if (alpha1[celli] > 0.5)
{
vol = alpha1[celli]*mesh.V()[celli];
}
else
{
vol = 0;
}
vol_tot_air += vol;
}
scalar vol_final_air = 2*3.14*vol_tot_air;
scalar vol_bubble = vol_final_air - vol_ori;
|
|
|
|
|
|
![]() |
| Tags |
| bubble, bubble diameter, bubble volume, post procesing |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Question about calculating the gas holdup in the bubble column simulation of openFOAM | banananumber1 | OpenFOAM Running, Solving & CFD | 0 | March 23, 2018 05:17 |
| bubble rising problem | swamysrikanth | ANSYS Meshing & Geometry | 3 | May 31, 2016 12:09 |
| alphaEqn.H in twoPhaseEulerFoam | cheng1988sjtu | OpenFOAM Bugs | 15 | May 1, 2016 17:12 |
| bubble rising in a column | swamysrikanth | Main CFD Forum | 2 | September 27, 2010 09:59 |
| [blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |