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

Interporlation??

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

Like Tree1Likes
  • 1 Post By Rob Hart

Reply
 
LinkBack Thread Tools Display Modes
Old   February 20, 2004, 23:19
Default Interporlation??
  #1
ccc
Guest
 
Posts: n/a
hi everyone,

How can I get the values of flow variables, for example, pressure, at one point in the flow field by udf? This point may not be at the centroid of some cell. The most direct method is to search the whole domain for the cell where this point is. It is obviously time-consuming and not feasible if you have many points to know. Any suggestion from you is highly appreciated.
  Reply With Quote

Old   February 21, 2004, 05:50
Default Re: Interporlation??
  #2
Rob Hart
Guest
 
Posts: n/a
I can't think of anyway to find which cell a point is in other than searching through the domain. However if you have a large number of points to find, (and perhaps have some knowledge about the mesh that is being used) you could optomise the process.

For example, if you sort your list of points by their x-coordinate (say), then when you run through all the cell-centroids, you can reject a particular cell without having to compare it to *all* the points. You could try to do a binary search through you points, or you could just go through them in order until you find one that has an x-coordinate beyond the cell-centroid.

if your points don't cover the entire domain, then find the min&max x,y,z coordinates you interested in first, and then you can easily reject centroids that you aren't interested in.

Taken to an extreme, you could probably make the whole process pretty much independant of the number of points.
  Reply With Quote

Old   February 21, 2004, 05:59
Default Re: Interporlation??
  #3
Rob Hart
Guest
 
Posts: n/a
btw, it wouldn't hurt to have a look through the udf header files for something that isn't documented but that could be useful.

e.g. dpm.h has:

FLUENT_EXPORT int SV_locate_point (real [], real [], CX_Cell_Id *);

FLUENT_EXPORT int SV_locate_point_in_thread (real [], real [], Thread *, CX_Cell_Id *);

FLUENT_EXPORT boolean SV_is_point_in_cell (CX_Cell_Id *, cell_t, Thread *, real []);

(obviously I don't know how the actually work, but the *sound* useful ;-) )
mm.abdollahzadeh likes this.
  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



All times are GMT -4. The time now is 03:40.