CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > 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 Display Modes
Old   July 14, 2014, 08:52
Default C_CENTROID is not returning the cell center coordinates
  #1
New Member
 
jyothsna k
Join Date: May 2014
Posts: 9
Rep Power: 3
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, 16:49
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 677
Rep Power: 9
pakk is on a distinguished road
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, 22:53
Default
  #3
New Member
 
jyothsna k
Join Date: May 2014
Posts: 9
Rep Power: 3
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
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


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


All times are GMT -4. The time now is 19:33.