# Cell centres

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

 June 4, 2003, 02:41 Cell centres #1 Tom 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 John 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 Tom 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 Tom Guest   Posts: n/a ...and the volume of a tet for that matter? thank you

 June 4, 2003, 12:28 Re: Cell centres #5 Ananda Himansu 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 one-sixth 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 cross-product 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 john 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 Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Purushothama CD-adapco 2 May 31, 2010 21:58 sebastian_vogl OpenFOAM Running, Solving & CFD 0 October 27, 2009 09:47 philippose OpenFOAM Bugs 2 June 5, 2009 13:19 michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15 AB CD-adapco 6 November 15, 2004 05:41

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