|
[Sponsors] |
C_CENTROID is not returning the cell center coordinates |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 14, 2014, 09:52 |
C_CENTROID is not returning the cell center coordinates
|
#1 |
New Member
jyothsna k
Join Date: May 2014
Posts: 18
Rep Power: 12 |
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 |
|
July 14, 2014, 17:49 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
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?
|
|
July 14, 2014, 23:53 |
|
#3 |
New Member
jyothsna k
Join Date: May 2014
Posts: 18
Rep Power: 12 |
Thank you for your response. I have attached all my UDFs and i have been using only fluent.
|
|
Tags |
cell center, c_centroid, not accessible |
|
|
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 |