CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Volume of general hexahedron

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mprinkey

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 23, 2015, 10:23
Lightbulb Volume of general hexahedron
  #1
New Member
 
Prakash
Join Date: Jan 2015
Posts: 14
Rep Power: 11
prak_1989 is on a distinguished road
Hi all,

How to calculate the volume of a general hexahedron whose faces are of different shapes and the four edges connecting the top and bottom surfaces are of different lengths and are not parallel to each other. Hope you could imagine that hexahedron
prak_1989 is offline   Reply With Quote

Old   November 23, 2015, 15:35
Default
  #2
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
Quote:
Originally Posted by prak_1989 View Post
Hi all,

How to calculate the volume of a general hexahedron whose faces are of different shapes and the four edges connecting the top and bottom surfaces are of different lengths and are not parallel to each other. Hope you could imagine that hexahedron
I'm no expert in computational geometry, but there is simple formula for computing volumes of tetrahedra. I wrote a library some time ago that implemented the tet formula for volume. Then I implemented the volume of a pyramid (one quad base and four triangular faces) as the sum of the volume of two tets. Then, I implemented the hex volume as the sum of three pyramid volumes (pick three faces that all touch each other at edges use those as the base for each. Use the opposite corner as top point for all three pyramids).

This all assumes that the faces are quadrilateral--I think that is a geometric requirement. If one face has four sides, I think they all do. You can build a six-sided volume using six triangles too. The above formula doesn't handle that case. Also, these quadrahedra must have vertices that are co-planar. This is probably not the most efficient way to compute the volume of general hexs, but it is more fool-proof than directly implementing a hex volume formula using a set of eight vectors. I generally only compute the volumes as part of the initialization process, so correctness is more important than absolute performance.
FMDenaro likes this.

Last edited by mprinkey; November 24, 2015 at 07:53.
mprinkey is offline   Reply With Quote

Old   November 23, 2015, 17:17
Default
  #3
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,771
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by mprinkey View Post
I'm no expert in computational geometry, but there is simple formula for computing volumes of tetrahedra. I wrote a library some time ago that implemented the tet formula for volume. Then I implemented the volume of a pyramid (one quad base and four triangular faces) as the sum of the volume of two tets. Then, I implemented the hex volume as the sum of three pyramid volumes (pick three faces that all touch each other at edges use those as the base for each. Use the opposite corner as top point for all three pyramids).

This all assumes that the faces are quadrahedral--I think that is a geometric requirement. If one face has four sides, I think they all do. You can build a six-sided volume using six triangles too. The above formula doesn't handle that case. Also, these quadrahedra must have vertices that are co-planar. This is probably not the most efficient way to compute the volume of general hexs, but it is more fool-proof than directly implementing a hex volume formula using a set of six vectors. I generally only compute the volumes as part of the initialization process, so correctness is more important than absolute performance.

I agree to the technique of decomposition in tetrahedra... it is very simple computing the volumes by using the 4-node based formula on each tetrahedron covering the grid and then computing volumes of of more complex shapes
FMDenaro is offline   Reply With Quote

Old   November 24, 2015, 05:14
Default
  #4
New Member
 
Prakash
Join Date: Jan 2015
Posts: 14
Rep Power: 11
prak_1989 is on a distinguished road
@mprinkey and @FMDenaro: Thank you for the spark. I did not think that way...!!
prak_1989 is offline   Reply With Quote

Old   November 25, 2015, 02:56
Default
  #5
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Consider the following approach:

http://www.dept.ku.edu/~cfdku/papers/1999-AIAAJ.pdf

after splitting the hexahedron faces in triangles (along the diagonal)
sbaffini is offline   Reply With Quote

Old   November 30, 2015, 07:44
Default
  #6
New Member
 
Prakash
Join Date: Jan 2015
Posts: 14
Rep Power: 11
prak_1989 is on a distinguished road
Thank you very much..!!
prak_1989 is offline   Reply With Quote

Old   April 16, 2018, 20:18
Default
  #7
New Member
 
Sourabh Bhat
Join Date: Jan 2010
Location: IITB, Mumbai, India
Posts: 4
Rep Power: 16
heySourabh is on a distinguished road
The method by @mprinkey is an interesting decomposition. However, probably this method will not work in case of non-convex hexahedra, as it will result in negative volumes being added. I have written a simple document at https://github.com/heySourabh/GeometryCalculations/tree/master/Stokes which provides a generic method with code. May be helpful to someone looking for this.
heySourabh is offline   Reply With Quote

Reply


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
snappyhexmesh remove blockmesh geometry philipp1 OpenFOAM Running, Solving & CFD 2 December 12, 2014 10:58
[ICEM] Volume orientation MGF ANSYS Meshing & Geometry 2 September 19, 2012 11:55
Volume 1 has invalid topology for mapped brick meshing georgewar ANSYS 0 July 24, 2011 16:02
Cell centroid and cell volume in general, and in Fluent zmester Main CFD Forum 3 October 17, 2009 11:05
help needed about phase change Yanhu Guo Main CFD Forum 4 January 23, 2001 23:16


All times are GMT -4. The time now is 18:17.