Is this correct formula for centre of quad?
Hi,
I'm trying to use structured grid on FVM with cell centered values. Hence given the coordinates of the quadrilateral, I need to find the cell centered coordinates. I search thru the internet and one of them listed the formula as coord (x1,y1) .... (x4,y4), center x = (x1+x2+x3+x4)/4 center y = (y1+y2+y3+y4)/4. Is this the correct formula? Thanks alot! 
Re: Is this correct formula for centre of quad?
Dear Quarkz,
If you are using the formulae for centroid of the quadrilateral, then you are absolutely right Regards, Ganesh 
Re: Is this correct formula for centre of quad?
The centroid in a finite volume method is the area/volume averaged point. In general, it is not equal to the the arithmetic average of the vertices (except for a triangle). To find the centroid for an arbitrary polygon, see
http://astronomy.swin.edu.au/~pbourk...etry/polyarea/ 
Re: Is this correct formula for centre of quad?
The arithmetic average formula for the centroid is also valid for a quadrilateral.
http://mathworld.wolfram.com/Quadrilateral.html 
Re: Is this correct formula for centre of quad?
hi,
in that case, what is the difference between the two? if the 1st formula is not the centroid, what is it? Can someone confirm that the 2nd formula is the correct one to find the center of a quadrilateral for a cell centre FVM? thanks alot! 
Re: Is this correct formula for centre of quad?
chill friend what you are doing works very well with FVM meshes, i am using the same approach in solver and had not got any problem till now.

Re: Is this correct formula for centre of quad?
>The arithmetic average formula for the centroid is also valid for a quadrilateral.
Ouf ! ;) 
Re: Is this correct formula for centre of quad?
For a cellcentered finite volume scheme, it is important to ensure that you are using the correct definition of centroid, especially for second order schemes where a linear reconstruction is used. It does not matter for a first order scheme. Remember that the cellaveraged value is a second order approximation to the value at the centroid,
u(x<sub>c</sub>) = u<sub>ave</sub> + O(h<sup>2</sup>) but if you take any other point in the cell, then the cell averaged value is only a first order approximation u(x) = u<sub>ave</sub> + O(h) The formula for the centroid given in http://astronomy.swin.edu.au/~pbourk...etry/polyarea/ is a general formula valid for any polygon. It should reduce to the arithmetic average formula for a triangle and quadrilateral. 
All times are GMT 4. The time now is 07:13. 