CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   location of each cell (http://www.cfd-online.com/Forums/openfoam/107623-location-each-cell.html)

mahdiiowa October 2, 2012 15:52

location of each cell
 
hey, does anyone know how can I get the x, y and z of each cell?

Bernhard October 3, 2012 02:02

Did you try searching the forum? This question has been answered a few times already.
http://www.cfd-online.com/Forums/ope...ordinates.html
http://www.cfd-online.com/Forums/ope...ll-center.html

mahdiiowa October 3, 2012 10:50

Thanks Bernhard!

aujamal20 November 16, 2012 13:10

cell information
 
Dear

I am new :cool:to OF and working on heat transfer problem. I defined a simple 2D rectangle (mesh 100*200) having inlet at topleft corner and outlet at bottom left corner.
I need the cell id next to top/bottom/etc patches to get averaged field values. Currently I dont know how i can get cell id or cell (xyz) by using mech.C(). Please tell me precisely what and where i have make changes in case directories to get this.:(

thanks in anticipation...

aujamal

mahdiiowa November 16, 2012 13:15

do you mean ID of the cell adjacent to the top and bottom boundaries?

Bernhard November 16, 2012 14:10

Quote:

Originally Posted by aujamal20 (Post 392597)
Dear

I am new :cool:to OF and working on heat transfer problem. I defined a simple 2D rectangle (mesh 100*200) having inlet at topleft corner and outlet at bottom left corner.
I need the cell id next to top/bottom/etc patches to get averaged field values. Currently I dont know how i can get cell id or cell (xyz) by using mech.C(). Please tell me precisely what and where i have make changes in case directories to get this.:(

thanks in anticipation...

aujamal

What are you trying to achieve exactly? I think you can achieve it by using the sample utility, or putting functionobjects in the controlDict.

aujamal20 November 17, 2012 15:15

Dear

Thanks alot for your response. As I have mentioned earlier that I am having a 2D rectangle, mesh (100*200) and therefore there are 100 cells in each row having 200 rows. I need to calculate the average value of temperature field in each row by taking the cell values. Now I need cell ID or cell xyz (location) of every cell in the domain (100*200) so that I can sort them row by row accordingly.
So let me know that how I can do this in a better way and how to set sample utility or functionobjects in condtrolDict to achieve this.

thanks


All times are GMT -4. The time now is 12:45.