CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Cell centroid and cell volume in general, and in Fluent

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 13, 2009, 19:07
Default Cell centroid and cell volume in general, and in Fluent
  #1
New Member
 
Zoltán Hercz
Join Date: Sep 2009
Posts: 17
Rep Power: 16
zmester is on a distinguished road
Hi

Is there anyone who can explain me how do the cell centroid(c_centroid) and cell volume(C_Volume) functions of Fluent work? What method they use to calculate the centroid and the volume of a cell. Im writing my code, and would like to create functions similar to these.Thanks.
zmester is offline   Reply With Quote

Old   October 17, 2009, 11:09
Default
  #2
New Member
 
Emre
Join Date: Oct 2009
Location: Ann Arbor, MI
Posts: 12
Rep Power: 16
esozer is on a distinguished road
I don't how fluent does this but the following will work for arbitrary cell geometries:

Code:
Loop faces
   Loop face nodes
     Form a triangle using two subsequent face nodes and a point within the face (e.g  average of face nodes)
     Calculate the resulting triangle area
     Add to face area
     Form a tetra using the triangle and a point within the cell volume
     Calculate tetra volume
     Add to cell volume
     Tetra centroid is known (google it)
     cell_centroid=cell_centroid+tetra_volume*tetra_centroid
   End face node loop
End face loop

cell_centroid=cell_centroid/cell_volume
Hope this helps.
__________________
Free CFD developer
www.freecfd.com
esozer is offline   Reply With Quote

Old   October 17, 2009, 11:55
Default
  #3
New Member
 
Zoltán Hercz
Join Date: Sep 2009
Posts: 17
Rep Power: 16
zmester is on a distinguished road
Thank you for your answer. Since i asked i have already find an other method using the divergence theorem (Gauss) to transform volume integrals to surface integrals.
zmester is offline   Reply With Quote

Old   October 17, 2009, 12:05
Default
  #4
New Member
 
Emre
Join Date: Oct 2009
Location: Ann Arbor, MI
Posts: 12
Rep Power: 16
esozer is on a distinguished road
Right, that will work too. I preferred the method I described since it will give the face areas, face centroids, cell volumes and cell centroids in one swipe.

Good luck with your code.
__________________
Free CFD developer
www.freecfd.com
esozer is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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



All times are GMT -4. The time now is 00:53.