CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Finding Coordinates of individual cell in U.internalField()

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 5, 2009, 15:29
Default Finding Coordinates of individual cell in U.internalField()
  #1
New Member
 
Bill Rosemurgy
Join Date: Mar 2009
Location: Ann Arbor, MI
Posts: 20
Rep Power: 8
brosemu is on a distinguished road
Hi,

I'm working on a procedure that requires looping through every cell in the U.internalField() and performing some operations. At each cell center I need to find the (x,y,z) location which I initially thought was going to be a trivial task (and it still may be), but I'm pretty stuck right now. As far as I can tell, all of the spatial information is contained in mesh.C(), my problem is how do I index correctly into mesh.C() so that I get the correct (x,y,z) for the current cell in U.internalField()?

I'm using a loop like the one below, and when I use "i" to index into U.internalField() and mesh.C() I don't think that I'm getting what I want. Does the i-th entry of U.internalField() correlate directly to the i-th entry of mesh.C()?

forAll(U,i)
{

}


Thanks!
brosemu is offline   Reply With Quote

Old   November 5, 2009, 17:34
Default
  #2
New Member
 
Bill Rosemurgy
Join Date: Mar 2009
Location: Ann Arbor, MI
Posts: 20
Rep Power: 8
brosemu is on a distinguished road
Please disregard my previous post.

It turns out that the i-th cell in U.internalField() does directly correspond to the i-th value in mesh.C().
brosemu is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FvMatrix coefficients shrina OpenFOAM Running, Solving & CFD 10 October 3, 2013 14:38
Reporting pressure at individual cell faces Shank FLUENT 0 September 11, 2007 12:24
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15
?? How to get cell center coordinates? erica FLUENT 0 May 11, 2005 22:02
Warning 097- AB CD-adapco 6 November 15, 2004 05:41


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