General

General

Is it possible to find the centroid coordinates of a (wall) surface without an UDF?

Tagged: ansys-fluent, udf

    • FAQFAQ
      Participant

      You can go to Report > Surface Integrals, then select Report Type as Area-Weighted Average, and for Field Variable Select Mesh, and under that you can select X-Coordinate, then select the Surface for which you want to calculate the centroid. This will give you the area-weighted X-coordinate of the centroid of the entire surface. You can repeat that for Y and Z coordinates. The formula used is: Xc = Sum(Ai*Xi)/Sum(Ai) Yc = Sum(Ai*Yi)/Sum(Ai) Zc = Sum(Ai*Zi)/Sum(Ai) where Xi, Yi, Zi are the X, Y, Z coordinates of the centroid of each mesh cell on that surface, and Ai is the Area of each mesh cell. Note that this calculation is mesh dependent so for a curved surface the finer your mesh, the more accurate the centroid values will be.