[vtkusers] Polyhedral volume computation

Andrew Parker andy.john.parker at googlemail.com
Tue Jun 12 09:05:49 EDT 2012


I would have used it except this put me off in the docs:

" vtkMassProperties<http://www.vtk.org/doc/nightly/html/classvtkMassProperties.html>
estimates
the volume, the surface area, and the normalized shape index of a triangle
mesh. "

On 12 June 2012 13:56, Jeff Lee <jlee1549 at gmail.com> wrote:

> did you look at vtkMassProperties?  it uses divergence theorem to compute
> volume which is face based and works on arbitrary polyhedra.
> Jeff
>
>
> On Tue, Jun 12, 2012 at 8:48 AM, Andrew Parker <
> andy.john.parker at googlemail.com> wrote:
>
>> Hi,
>>
>> Many thanks, yes, linear only but an arbitrary number of faces.  I would
>> have bet there was another way of doing this, and that I've used it, I just
>> can't remember how I did it.
>>
>> Do you not think it's rather odd there is a lack of support for simple
>> metrics like this given an arbitrary polyhedra?  One needs only the faces
>> and nodes.  Under the assumption each face is planer then this sort of
>> thing is quite easy, and would at least make the vtk support for this for
>> type of metric with planer faces much more applicable to a significantly
>> larger number of users.  See the following as a good example which is used
>> in CFD and has been for many years:
>>
>> http://www.public.iastate.edu/~zjw/papers/1999-AIAAJ.pdf
>>
>> I appreciate in the non-planer case something else needs to be done, but
>> all of this could be hidden behind a wrapper class that provides metrics
>> regardless of cell type.  If this is indeed in vtk and anybody can point me
>> to it then that would be really helpful.
>>
>> Cheers,
>> Andy
>>
>>
>> On 12 June 2012 12:59, Jochen K. <jochen.kling at email.de> wrote:
>>
>>> Hi Andy,
>>>
>>> do you address only linear elements with arbitrary polyhedrons?
>>> Or should support be given to quadratic, biquadratic, triquadratic and
>>> even
>>> convexPointSets elements too?
>>>
>>> In any case all cells must be traversed, right?
>>>
>>> While traversing all cells I would check the celltype and store the
>>> cellid
>>> (for cell assignment of the calculated volume later on).
>>>
>>> If the current cell is a primitve type like tetrahedron etc. calculate
>>> the
>>> volume and traverse next cell.
>>>
>>> In case it's a more complicated element I would tetrahedralize it, and
>>> sum
>>> up the volume of each given tetrahedron.
>>>
>>> That's it.
>>>
>>> If the grid consists of a lot of nonlinear elements the result will
>>> probably
>>> deviate a bit from the correct value. The questionis how exactly you want
>>> the result to be.
>>>
>>> For a cross-check I would apply a surfacefilter to the whole grid,
>>> tetrahedralize it, and sum up the tetrahedron volumes.
>>> Then compare the volume of both approaches. They should be more or less
>>> identical.
>>>
>>>
>>> with best regards
>>> Jochen
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://vtk.1045678.n5.nabble.com/Polyhedral-volume-computation-tp5713778p5713792.html
>>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>
>>
>>
>> --
>>
>> __________________________________
>>
>>    Dr Andrew Parker
>>
>>    Em at il:  andrew.parker at cantab.net
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>


-- 

__________________________________

   Dr Andrew Parker

   Em at il:  andrew.parker at cantab.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120612/d8eb06d0/attachment.htm>


More information about the vtkusers mailing list