CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF problem (https://www.cfd-online.com/Forums/fluent/45806-udf-problem.html)

david August 22, 2007 03:33

UDF problem
 
I have overcome a problem for the UDF where i have write a simple C program as shown below:

#include "udf.h"

DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; real t = CURRENT_TIME;

begin_f_loop(f, thread) { F_PROFILE(f, thread, position) = 15.+(5.*sin(351.9*t)); } end_f_loop(f, thread) }

However, it shows parse error at the 1st line, which i cannot solve the problem. Somebody can please help me??

majd August 22, 2007 03:41

Re: UDF problem
 
do you interpret or compile it?

david August 22, 2007 04:44

Re: UDF problem
 
I interpret it. i do follow the example from fluent tutorial and dont know why got parse error.

majd August 22, 2007 05:01

Re: UDF problem
 
if you use browse to identify the location of your file, you musn't do that. you have to do exactly like fluent example.

Dylan August 22, 2007 15:17

Re: UDF problem
 
Yeah, for instance...

If your UDF file is in the same directory as your case file and named "example.c", then type just "example.c" in the source file name, not the entire path of the location of the file as the manual suggests.

That should work.


All times are GMT -4. The time now is 19:22.