CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

PARSE ERROR Message when interpreting UDF in FLUENT

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

LinkBack Thread Tools Search this Thread Display Modes
Old   May 24, 2009, 11:40
Default PARSE ERROR Message when interpreting UDF in FLUENT
New Member
Join Date: May 2009
Posts: 4
Rep Power: 16
dhimans is on a distinguished road
Hi friends,

I am repeatedly getting a PARSE ERROR message when I try to interpret my source file(named HTCOi.c) containing UDFs
This is what I intend to do with the UDF :-

1. Obtain Heat transfer Coef using a function DEFINE_ON_DEMAND(HTcoef1) modify(using a Correction factor) and store it in UDMI after solving for convection (GAS.msh) over a plate

2. Read another case (SOLID.msh which is a plate) and impose the HT coef stored in UDMI through function DEFINE_PROFILE(HTcoef2,t,pos)
************************************************** *******
However, when I interpret HTCOi.c i get the following error

cpp -I"C:\Fluent.Inc\fluent6.3.26/src" -I"C:\Fluent.Inc\fluent6.3.26/cortex/src" -I"C:\Fluent.Inc\fluent6.3.26/client/src" -I"C:\Fluent.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<udfconfig.h>" "C:\Users\Sushant Dhiman\Desktop\AUTOMATION_CODES\U
Error: C:\Users\Sushant Dhiman\Desktop\AUTOMATION_CODES\UDFs\HTCOi.c: line 28: parse error.
Error: C:\Users\Sushant Dhiman\Desktop\AUTOMATION_CODES\UDFs\HTCOi.c: line 29: parse error.
Error: C:\Users\Sushant Dhiman\Desktop\AUTOMATION_CODES\UDFs\HTCOi.c: line 33: f: undeclared variable
************************************************** **********

The HTCOi.c UDF that I use is as Follows

#include "udf.h"
#include "math.h"

/* ##Definition of global variables and constants ########## */

#define tinf 400
#define CF 1 /* Correction factor */
#define ID 0 /* Domain ID to be used in ON DEMAND UDF(default interior ID=0) */
#define ZID 3 /* ID of the Zone of which HT coeff has to be used (plate_top ID=3)*/

int i;

/* ###### OBTAINS THE HT_Coeff from plate_top in GAS.msh#####*/


Thread *t;
Domain *d;


real temp,q;
face_t f;



temp=F_T(f,t); /* Obtains the Temp at the surface */
q=BOUNDARY_HEAT_FLUX(f, t); /* gets the TOTAL Heat flux vector at the surface */
F_UDMI(f,t,0)=CF*fabs(q/(temp-tinf)); /* Calculates the HT coefficient and stores in user defined memory */



/* ### IMPOSES THE HT_Coeff PROFILE ON the face in SOLID.msh ## */



Thread *t;
face_t f;


F_PROFILE(f,t,pos) = F_UDMI(f,t,0);

************************************************** ********

I would really appreciate some help on this


dhimans is offline   Reply With Quote


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
need some basic help with fluent udf aarti sekaran FLUENT 8 February 12, 2008 00:57
compiling my UDF Seyed Farid Hosseinizadeh FLUENT 22 February 14, 2006 10:19
Fluent 6.1/6.2 UDF compatability Allan Walsh FLUENT 1 April 29, 2005 11:49
UDF of Zimont model in fluent Z Main CFD Forum 0 February 17, 2005 03:07
UDF in Fluent to Match Mass Flow at Pressure Outlet Jonas Larsson Main CFD Forum 1 April 29, 1999 10:44

All times are GMT -4. The time now is 05:07.