
[Sponsors] 
June 4, 2003, 02:41 
Cell centres

#1 
Guest
Posts: n/a

Hi, what is the most accurate method to calculate the centre of a general polyhedral cell?


June 4, 2003, 05:28 
Re: Cell centres

#2 
Guest
Posts: n/a

Divide it into tetrahedrals and calculate the individual tetra center: the polyhedral center is sumup(ViCi)/sumup(Vi), where Vi is volume of each tetra, and Ci is the center of each tetra.


June 4, 2003, 08:56 
Re: Cell centres

#3 
Guest
Posts: n/a

Thank you. Will do, but how do I calculate the centre of a tet?


June 4, 2003, 09:04 
Re: Cell centres

#4 
Guest
Posts: n/a

...and the volume of a tet for that matter?
thank you 

June 4, 2003, 12:28 
Re: Cell centres

#5 
Guest
Posts: n/a

the centroid of a tet (or any simplex, the tet being a 3D simplex) is the arithmetic average of [the position vectors representing] its vertices. note that such a statement is not in general true for polytopes other than simplices, which is why you have to decompose a general polyhedron into tets.
pick any vertex of the tet. label it "O". label, in any order, the other three vertices "A", "B", "C". denote the vector from O to A by the label "a", from O to B by "b", similarly "c". the volume of the tet is onesixth of the magnitude of the scalar or "box" product of the three vectors a, b, c. that is, volume(OABC)=a.(bxc)/6. (the analogous formula for a triangle embedded in 3D is that the area of triangle OAB is half the magnitude of the crossproduct of a and b, that is, area(OAB)=axb/2.) the decomposition of general polyhedra into the union of tetrahedra with plane faces is not in general exact. for example, if a polyhedron has a quadrilateral for a side, the vertices of the quad need not lie in a plane. then the decomposition of the quad into two or more tets is only an approximation. these issues have been noted in old papers, and are probably discussed in any CFD text that explains unstructured meshes. also probably covered previously in this forum (do a search). 

June 4, 2003, 14:54 
Re: Cell centres

#6 
Guest
Posts: n/a

Another means is to calculate the determinate of the following expression:
V=(1/6)*x1 y1 z1 1  x2 y2 z2 1  x3 y3 z3 1  x4 y4 z4 1  where the x, y & z's are the coordinates of the respective points defining the tetrahedron. Note that the volume will always be positive, even though the value of the determinate might be negative depending upon the ordering of the points. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Cells with t below lower limit  Purushothama  CDadapco  2  May 31, 2010 21:58 
How to determine the direction of cell face vectors on processor patches  sebastian_vogl  OpenFOAM Running, Solving & CFD  0  October 27, 2009 09:47 
SVN 1226  Possible bug with cell centres and volumes  philippose  OpenFOAM Bugs  2  June 5, 2009 13:19 
Trimmed cell and embedded refinement mesh conversion issues  michele  OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ...  2  July 15, 2005 04:15 
Warning 097  AB  CDadapco  6  November 15, 2004 05:41 