CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   error: line 1 parse error (

Arky April 28, 2004 02:49

error: line 1 parse error
I'm trying to pass the Interpreted UDF to Fluent 6.1. But the progrma generates the following messgae: line 1 parse error. Even when I'm trying to interpret HelloWorld UDF. Can anybody help me?

thomas April 28, 2004 03:42

Re: error: line 1 parse error
post your UDF !

Arky April 28, 2004 06:02

Re: error: line 1 parse error
I was trying to interpret the following example code (which is in documentation). Still no result...

#include "udf.h" /* must be at the beginning of every UDF you write */

DEFINE_PROFILE(inlet_x_velocity, thread, index) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f;

begin_f_loop(f, thread) /* loops over all faces in the thread passed

in the DEFINE macro argument */



y = x[1];

F_PROFILE(f, thread, index) = 20. - y*y/(.0745*.0745)*20.;

} end_f_loop(f, thread) }

thomas April 28, 2004 08:18

Re: error: line 1 parse error
For me it compiled and interpret well. Check your compiler.

Karthick April 28, 2004 09:10

Re: error: line 1 parse error
Dear Arky

U check whether the udf file is in same folder as the case file u are running. What I have done is, first I've kept the same udf which u posted in my desktop and interpreted. It showed parse error.

Then I transferred to the case file folder and run the same udf. It interpreted well.

If u have still problems, write to me.

Regards Karthick

Arky April 29, 2004 03:57

Re: error: line 1 parse error
The UDF is in the folder that contains .cas and .dat files. I even tried to place the UDF source file, .cas and .dat files into ..\ntbin\ntx86, and still the same error. I suppose that something wrong with paths to some files, but I dont know exactly to which ones.

Karthick April 29, 2004 04:39

Re: error: line 1 parse error
Dear Arky

Don't worry, it will not be a problem with ur udf. May be there may be a problem with ur path. I'll send u file helps to u set the path correctly to ur personal id.

Check it and then tell

Regards Karthick

Arky April 30, 2004 05:34

Re: error: line 1 parse error
Thanx a lot! i've installed MS VC and everything is working properly! Thanks again. :)

Barry May 6, 2004 05:44

Re: error: line 1 parse error
In windows you can fix the problem by simply launching fluent from the directory where your UDF and case files are, by typing fluent xxx (e.d 2dddp etc) on the dos prompt

All times are GMT -4. The time now is 00:11.