CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How to find out the cell containing a arbitrary point

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By niklas

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 6, 2005, 00:46
Default In my code, I want to know in
  #1
Member
 
Luckyluke
Join Date: Mar 2009
Posts: 51
Rep Power: 17
luckyluke is on a distinguished road
In my code, I want to know in which cell a arbitrary point is contained.
luckyluke is offline   Reply With Quote

Old   April 6, 2005, 03:24
Default vector position(1.0, 0.123, 8.
  #2
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
vector position(1.0, 0.123, 8.12);
label celli = mesh.findCell(position);
nimasam and satyam4841 like this.
niklas is offline   Reply With Quote

Old   July 10, 2013, 11:54
Default
  #3
Member
 
Felipe Alves Portela
Join Date: Dec 2012
Location: FR
Posts: 70
Rep Power: 13
fportela is on a distinguished road
Hi there,

I have similar question (so I decided not open a new thread just for this).

Is it possible to get a list of all cells who contain a given point? As I understand, "mesh.findCell(position);" will give me the cell whose centre is nearest to "position"; in my case, "position" will be coordinates of cells nodes, so I need to get all the cells that 'contain' that point...

Cheers,
Felipe
fportela is offline   Reply With Quote

Reply


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 calculate the field value of a arbitrary point luckyluke OpenFOAM Running, Solving & CFD 7 February 28, 2014 15:14
Torque Calculation at Arbitrary Point Mojtaba CFX 8 March 1, 2009 00:22
Calculation torque on arbitrary point Mojtaba Main CFD Forum 0 February 9, 2009 00:08
Calculation torque on arbitrary point Mojtaba CFX 0 February 6, 2009 23:45
Algorithm to find cell no. in O-grid for a point Ben Main CFD Forum 5 June 22, 2007 11:23


All times are GMT -4. The time now is 17:31.