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

Plotting coordinates of face centroids

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   May 7, 2009, 07:19
Default Plotting coordinates of face centroids
  #1
Member
 
O.D.Y.'s Avatar
 
Join Date: Mar 2009
Posts: 49
Rep Power: 17
O.D.Y. is on a distinguished road
Hi @all,

I'm trying to display the coordinates of the face centroids of a wall zone via UDM in contur plot panel. I'm using the following UDF to determine the coordinates and to put them into UDMs:

#include "udf.h"

DEFINE_ON_DEMAND(face_centrs)
{
Domain *d;
Thread *t;
face_t f;
real x[ND_ND];

int domain_id, blade_id;

domain_id = 1;
blade_id = 17;

/* get the domain pointer to the flow_domain */
d = Get_Domain(domain_id);

/* get the thread pointer to the bladethread */
t = Lookup_Thread(d,blade_id);

begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
F_UDMI(f,t,0)=x[0];
F_UDMI(f,t,1)=x[1];
F_UDMI(f,t,2)=x[2];

Message("y-coord: %f \n", F_UDMI(f,t,1));

}
end_f_loop(f,t);

}

As you can see, I print the y-coordinate to the screen which works perfectly. But when I want to display the UDMs in the contour plot panel, all the values are zero. Can anyone tell where my mistake is?

I'd really appreciate any help.

cheers
O.D.Y. is offline   Reply With Quote

 


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
[Netgen] Import netgen mesh to OpenFOAM hsieh OpenFOAM Meshing & Mesh Conversion 32 September 13, 2011 05:50
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 07:36
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15


All times are GMT -4. The time now is 06:54.