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

what's wrong with my UDF??

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 5, 2007, 02:35
Default what's wrong with my UDF??
  #1
zlk
Guest
 
Posts: n/a
#include "udf.h" #define PI 3.1415926 #define R 0.0045 #define Q 2000 #define xs 0.61 #define Rj 0.0045 #define I 100 #define u 1.26e-6 #define L 0.01 DEFINE_SOURCE(cell_heat_source,cell,mixture_thread ,dS,eqn) double x,y,a,b,t,w;

w=(PI/180)*1000; /*15*/

double xc[ND_ND],source;

int phase_domain_index=0;

Thread *water_thread=THREAD_SUB_THREAD (mixture_thread,phase_domain_index); /*18*/

C_CENTROID(xc,cell,mixture_thread);

x=xc[0];

y=xc[1];

if(C_VOF(cell,water_thread)<1&&C_VOF(cell,water_th read)>0&&y<0)

{

t=RP_Get_Real("flow-time");

a=(PI/3)*sin(w*t);

b=-atan(y/x);

if(fabs(a-b)<(PI/6))

{

source=1000*(3*Q*xs/(PI*R*R));

dS[eqn]=0;

}

else

source=dS[eqn]=0;

}

else

source=dS[eqn]=0;

return source; }

Error: E:\4.5ngwelding\ng4.5.c: line 15: parse error.

Error: E:\4.5ngwelding\ng4.5.c: line 16: parse error.

Error: E:\4.5ngwelding\ng4.5.c: line 17: parse error.

Error: E:\4.5ngwelding\ng4.5.c: line 18: xc: undeclared variable
  Reply With Quote

Reply


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
parse error while interpreting udf Kristin Fluent UDF and Scheme Programming 3 March 15, 2012 06:43
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 11:29
what's wrong with the UDF major FLUENT 6 March 3, 2005 06:39
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03


All times are GMT -4. The time now is 04:39.