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

How to compute total liquid volume of the whole domain

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 21, 2010, 15:13
Default How to compute total liquid volume of the whole domain
  #1
Member
 
angel
Join Date: May 2009
Location: Spain
Posts: 46
Rep Power: 8
anmartin is on a distinguished road
I finished an interDyMFoam run. The case has variations of liquid in the domain, i would like to discover it but at the same time, I would like to compute the total liquid volume at each time step (post-porcessing). Can someone suggest the way(s) to do this?

Where i have to put the code from How to compute total liquid volume of the whole domain

Info << " Liquid: " << sum(mesh.V()*gamma) << endl;

Thanks!
anmartin is offline   Reply With Quote

Old   April 22, 2010, 03:05
Default
  #2
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Stockholm, Sweden
Posts: 360
Rep Power: 12
romant is on a distinguished road
You can put the code into the main function, close to the end of the loop like before the solver writes the time information.

After that you have to recompile the solver.
__________________
~roman
romant is offline   Reply With Quote

Old   April 22, 2010, 15:22
Default
  #3
Member
 
angel
Join Date: May 2009
Location: Spain
Posts: 46
Rep Power: 8
anmartin is on a distinguished road
Thanks a lot,

I have recompile interDyMFoam, and now i can see the total volume of fluid inside my domain as:
Time = 0.05
Liquid: sum((V*alpha1)) [0 3 0 0 0 0 0] 0.033936

Time = 9.08938
Liquid: sum((V*alpha1)) [0 3 0 0 0 0 0] 0.0338348


Unfortunately, i still have another problem.

I have some fluid, but my simulation is a Tank (wall) excite by a sinusoidal lateral excitation using InterDyMFoam.

Anybody know what could be the reason? Any ideas?

Thanks,
anmartin is offline   Reply With Quote

Old   April 23, 2010, 02:16
Default code correction
  #4
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Stockholm, Sweden
Posts: 360
Rep Power: 12
romant is on a distinguished road
Quote:
Originally Posted by anmartin View Post
Thanks a lot,

Time = 0.05
Liquid: sum((V*alpha1)) [0 3 0 0 0 0 0] 0.033936

Time = 9.08938
Liquid: sum((V*alpha1)) [0 3 0 0 0 0 0] 0.0338348
Sorry I forgot something. Of course the code must read
Code:
Info << " Liquid: " << sum(mesh.V()*gamma).value() << endl;
__________________
~roman
romant is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
Please Help.....Insufficient Catalogue Size Paresh Jain CFX 17 March 11, 2014 12:40
interDyMFoam - change in volume fraction gopala OpenFOAM Running, Solving & CFD 0 April 27, 2009 10:46
How to apply negtive pressure to outlet bioman66 CFX 5 June 3, 2006 01:40
New topic on same subject - Flow around race car Tudor Miron CFX 15 April 2, 2004 06:18


All times are GMT -4. The time now is 10:33.