CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Calculating bubble volume in rising bubble simulation

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 4, 2021, 16:14
Default Calculating bubble volume in rising bubble simulation
  #1
Member
 
Venkat Ganesh
Join Date: May 2020
Location: Cincinnati, Ohio
Posts: 49
Rep Power: 6
Venky_94 is on a distinguished road
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;
Venky_94 is offline   Reply With Quote

Reply

Tags
bubble, bubble diameter, bubble volume, post procesing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 04:17
bubble rising problem swamysrikanth ANSYS Meshing & Geometry 3 May 31, 2016 11:09
alphaEqn.H in twoPhaseEulerFoam cheng1988sjtu OpenFOAM Bugs 15 May 1, 2016 16:12
bubble rising in a column swamysrikanth Main CFD Forum 2 September 27, 2010 08:59
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00


All times are GMT -4. The time now is 22:48.