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

C_CENTROID is not returning the cell center coordinates

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 14, 2014, 09:52
Default C_CENTROID is not returning the cell center coordinates
  #1
New Member
 
jyothsna k
Join Date: May 2014
Posts: 18
Rep Power: 11
jyothsna k is on a distinguished road
My code is as below:
DEFINE_SOURCE(x_src,c,t,dS,eqn)
{
real source;
real x,y,z,r,h;
real xc[ND_ND];

C_CENTROID(xc,c,t);
x = xc[0];y=xc[1];z=xc[2];
r=sqrt(x*x+y*y); h=y/r;
t1=mu0*J;
if (z>=zl && z<=zu && r>=ri && r<=ro)
{source = -t1*h ;}
else
{source=0;}

C_UDMI(c,t,8) =x;
return source;
}

mu0, J, ri,ro have been defined as constants.
When i check the memory numbered 8 there are no values of x there. I have tried to incorporate a similar code in ADJUST. even there i'm facing the same problem. I have used this code before for another model with no problems. I'm unable to find the cause.
Thanks in advance
jyothsna k is offline   Reply With Quote

Old   July 14, 2014, 17:49
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Sorry if this is a silly question, but did you remember to attach the udf? Are you sure that it is actually run by Fluent?
pakk is offline   Reply With Quote

Old   July 14, 2014, 23:53
Default
  #3
New Member
 
jyothsna k
Join Date: May 2014
Posts: 18
Rep Power: 11
jyothsna k is on a distinguished road
Thank you for your response. I have attached all my UDFs and i have been using only fluent.
jyothsna k is offline   Reply With Quote

Reply

Tags
cell center, c_centroid, not accessible

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[General] extract the cell center coordinates if the CELLID is know openfoammaofnepo ParaView 2 January 12, 2017 07:54
?? How to get cell center coordinates? erica FLUENT 0 May 11, 2005 23:02
interpolation from cell center to vertices Zhang Main CFD Forum 3 August 22, 2003 08:31
calculate cell volume, center...? Paul Main CFD Forum 5 June 21, 2003 13:55
About Cell Center Harry FLUENT 0 December 3, 2000 05:33


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