CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   syntax error on line 1 (https://www.cfd-online.com/Forums/fluent/36394-syntax-error-line-1-a.html)

Radboud April 15, 2005 09:43

syntax error on line 1
 
Dear reader,

We have recently updated to fluent 6.2.16 from 6.1.22, and my udf, although it ran before, no longer compiles (interpreted mode). I receive a syntax error on line 1, which is a comment line. If I take away this line a syntax error is reported on the DEFINE_PROFILE line (see code below). The udf.h is in the default folder, and my case . We run Fluent on a linux machine.

/* comment */ #include "udf.h" DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; real t = CURRENT_TIME; real pi; pi=3.14159265358979; begin_f_loop(f, thread) {

F_PROFILE(f, thread, position) = .04*sin(2*pi*t); } end_f_loop(f, thread) }

I hope someone can help me, thanks in advance

Radboud

rom April 15, 2005 10:08

Re: syntax error on line 1
 
i tried your udf on my winxp flu 6.2.16 machine and it worked in interpreted mode. your problem must be somwhere else.

rom

Radboud April 15, 2005 10:17

Re: syntax error on line 1
 
thanks for trying, I appreciate the effort. A likely guess would be a problem with our upgrade, but if anyone has other ideas, I'd be interested in hearing them.

best regards

Radboud

Ale April 15, 2005 11:42

Re: syntax error on line 1
 
Hi

I tried to interpret your code on Windows Fluent 6.1.22 and had no problems. I think the problem is not your UDF, but something wrong with the interpreter. Check the intepreting procedure in unix.

Regards,

Ale

Swarup April 16, 2005 11:39

Re: syntax error on line 1
 
do you need to use math.h for sin function?

Swarup


All times are GMT -4. The time now is 17:29.