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

Get Cell by Coordinates in Fluent 15.0.0

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 3 Post By Manathan
  • 1 Post By jiangzili

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   February 9, 2015, 09:12
Default Get Cell by Coordinates in Fluent 15.0.0
  #1
New Member
 
Join Date: Feb 2015
Posts: 2
Rep Power: 0
haggis is on a distinguished road
Hi Everybody,
I'm working with Fluent 15.0.0 and need to find the cell of the domain that contains a certain point (specified by its coordinates).
My approaches so far:
  • "SV_locate_point" of the "dpm.h": always gives me "Received signal SIGSEGV". Does that happen when the point is outside of the domain? Is there a way to check if the given point is inside the domain? What does the returned "int" stand for?
  • "CX_Find_Cell_With_Point" of the "cxndsearch.h": runs without any messages but when I try to access the cell then I get the same failure as mentioned above. Does anybody know the meanings of the parameters (for "CX_Start_ND_Point_Search" as well)?
Am I doing something wrong or does anyone know another solution? Any help is much appreciated!

My Code:

#include "dpm.h"
#include "cxndsearch.h"

CX_Cell_Id *cx_cell;
double x[ND_ND];
int i;
ND_Search *search;
for (i = 0; i < ND_ND; i++)
{
x[i] = 0.0;
}

Message("sv_locat_point: %d\n", SV_locate_point(x, cx_cell)); //fails!

search = CX_Start_ND_Point_Search(search, 1, 0);
cx_cell = CX_Find_Cell_With_Point(search, x, 0);
search = CX_End_ND_Point_Search(search);
if (NULL != cx_cell)
{
Message("check\n");
Message("cx_find_cell id: %d\n", RP_CELL(cx_cell)); //fails!
}
haggis is offline   Reply With Quote

 

Tags
cell, coordinates, point, search


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
UDF: Given coordinates, How to identify the cell? Zhang Fluent UDF and Scheme Programming 26 August 15, 2022 05:54
working in cylindrical coordinates in fluent Randheer Yadav FLUENT 2 January 18, 2015 16:25
Two dimensional simulation of a PEMFC in Fluent fuel cell module A CFD free user FLUENT 0 October 17, 2014 06:59
[Workbench] Creation of Cell Zones for processing in FLUENT kailingkk ANSYS Meshing & Geometry 0 October 5, 2013 05:09
?? How to get cell center coordinates? erica FLUENT 0 May 11, 2005 22:02


All times are GMT -4. The time now is 10:51.