CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

How Fluent calculates the C_Centroid for 3D cell

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 27, 2013, 06:54
Default How Fluent calculates the C_Centroid for 3D cell
  #1
New Member
 
qiu
Join Date: Apr 2012
Posts: 4
Rep Power: 14
yiphome is on a distinguished road
Hello all,

I am programming a UDF to input cell-wise heat source. I obtained the C_CENTROID from UDF and try to match with the cell center location calculated by myself, but some cells come out a difference in 1e-4 m in cell size of ~1e-3 m.

I calculated the cell center in this way: Centroid_X = (x1+x2+ ...+ Xn)/n, Centroid_Y=... . It is a correctly way to calculate the coordinates of Centroid? How Fluent calculates C_Centroid for polyhedron 3D cells?

Best regards,
yiphome
yiphome is offline   Reply With Quote

Old   May 27, 2013, 07:34
Default
  #2
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
So the xn in your equation are the coordinates of the cell vertices and you evaluate the cell centroid as their average?

Think of a hexahedron where you split one of the six faces into lots of smaller faces, creating many vertices.
Now the more you split the face, the more the cell centroid turns into the centroid of the face.
To prevent this, you could calculate a weighted average instead, using the area of the adjacent faces as weighting factors.

I actually dont know what fluent does. Isnt this somewhere in the manual?
flotus1 is offline   Reply With Quote

Old   May 27, 2013, 10:02
Default
  #3
New Member
 
qiu
Join Date: Apr 2012
Posts: 4
Rep Power: 14
yiphome is on a distinguished road
Yes you are right. But in case of PYRA5 I get different center point with Fluent. That is strange.

Best regareds,
Yuefeng
yiphome is offline   Reply With Quote

Old   May 27, 2013, 21:50
Default
  #4
Senior Member
 
Join Date: Aug 2011
Posts: 421
Blog Entries: 1
Rep Power: 22
blackmask will become famous soon enough
You agreed with Alex, yet you do nothing more than repeating that your question. What is the way FLUENT calculates the centroid and how do you know it? What is your algorithm?
blackmask is offline   Reply With Quote

Reply

Tags
c_centroid, fluent, udf


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
How to determine the direction of cell face vectors on processor patches sebastian_vogl OpenFOAM Programming & Development 1 October 11, 2016 14:17
Cell Monitoring for reading and analysis Result (FLUENT) - Turbine Combustion Chamber bubuchacha FLUENT 0 March 12, 2013 23:14
Mixed cell zone remeshing in FLUENT 12 ChesterP FLUENT 6 November 1, 2011 07:53
Fluent jobs through pbs ibnkureshi FLUENT 5 June 9, 2011 14:43
How Fluent calculates pressure? wy462047 FLUENT 1 January 3, 2009 14:23


All times are GMT -4. The time now is 21:11.