
[Sponsors] 
May 21, 2013, 07:47 
how to... calculate the volume of specified selection

#1 
New Member
Join Date: Sep 2011
Posts: 13
Rep Power: 6 
hi there,
1: sry if thread is redundant i tried looking for this in this forum and via guugle, but i couldnt find a satisfying answer to my problem, maybe also because im kind of a newbie, so any help is much wanted and greatly appreciated 2: the situation i have a case where i would like to find out the total volume of a specific field with values in a specified range, i.e. i want to know what the total volume of the selection is. a trivial example could be in multiphase flows (dambreak) to give the volume of one phase. 3: how i've been trying to solve it i basically searched for the solution using two approaches: paraview and OF utilities. since i postprocess most data via PV anyway, i tried this first, e.g making a specified selection: unfortunately the information panel only gives the bounds of the selection, if the geometry isnt cuboidal however this doesnt help. i looked in the filter section, but apart form the integrate variables filter  which doesnt seem to work or i simply cant handle it  i didnt find sth suitable. the OF utilities werent any help either, if foamCalc is able to do what i want, i dont know how to use it in that way. 4: request i can imagine that there is already a (simple) solution for that. unfortunately i dont know it and havent found a thread for it, a wikientry, an example that shows how it can be done, etc. can anyone help? 

May 30, 2013, 23:19 

#2 
Member
Thomas Boucheres
Join Date: May 2013
Posts: 37
Rep Power: 4 
Hi,
not so direct with standard version of OpenFOAM Nevertheless you can process in two steps after the simulation finished: 1. use the topoSet utility with the cellSet/fieldToCell functionality (see source code in meshTools/sets/cellSet/fieldToCell to see how to parameter utility) 2. after that use the fieldValues utility. Take any operation and any field and apply it on the previous cellSet N.B : to use these tools after the simulation ran, you need to use the execFlowFunctionObject object. 

June 3, 2013, 08:16 

#3 
New Member
Join Date: Sep 2011
Posts: 13
Rep Power: 6 
hello thomas, thank you very much for your reply
unfortunately i didnt mention that i am using OF 1.7.0, so the mentioned utilities are new to me..., i.e. i cant apply them because they are not implemented... and since my codewriting skills are very poor i wouldnt know how to implement this into the code nevertheless i appreciate ur answer... i imagine that you would hardly have the time and patience to guide me through making this  step by step... so no hard feelings... but online tutorials are hard to find, and if there are any, it's mostly not beginner level, so it is very difficult and time consuming to "learn" like that... ERGO, if you do have the time and patience to explain step by step, i shall follow ur guidance and do my very best to forever know the answer to my question further/different advice is also appreciated 

June 3, 2013, 08:31 

#4 
Member
Join Date: Nov 2012
Posts: 58
Rep Power: 5 
Have you tried in ParaView the following?
1) "threshold" filter to select the appropriate cells according to your quantity of interest 2) "integrate variables" filter and click on "information" 

June 5, 2013, 07:12 

#5  
New Member
Join Date: Sep 2011
Posts: 13
Rep Power: 6 
Quote:
anyway, thx 

February 20, 2015, 06:11 

#6 
New Member
Priya dharshini
Join Date: Feb 2015
Posts: 1
Rep Power: 0 
Thats really cool. Thanks for the anwer
__________________
Volume Calculator 

Tags 
calculate, openfoam, paraview, postprocessing, volume 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
how to calculate the m³ of a `thresholdŽ volume  happysimulant  OpenFOAM Paraview & paraFoam  2  April 14, 2011 10:01 
How to calculate liquid volume as the interface moves for interFoam Solver  asaha  OpenFOAM Running, Solving & CFD  25  October 21, 2009 04:34 
CuBit  t42  OpenFOAM Meshing & Mesh Conversion  6  July 10, 2008 07:51 
fluent add additional zones for the mesh file  SSL  FLUENT  2  January 26, 2008 12:55 
how to calculate volume fraction of particles from  x. simth  FLUENT  2  April 26, 2001 15:40 