CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   udf compile error (https://www.cfd-online.com/Forums/fluent/37510-udf-compile-error.html)

rawin August 8, 2005 03:31

udf compile error
 
Hi; I use this Udf to define unsteady velocity inlet profile.

unsteady.c #include"udf.h" DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; begin_f_loop(f, thread) { real t=RP_Get_Real("flow-time"); F_PROFILE(f, thread, position)=20.+5.0*sin(10.*t); } end_f_loop(f, thread) }

but when I compile it, Fluent report this error: cpp -ID:\FLUENT.INC\fluent6.0/src -ID:\FLUENT.INC\fluent6.0/cortex/src -ID:\FLUENT.INC\fluent6.0/client/src -ID:\FLUENT.INC\fluent6.0/multiport/src -I. -DUDFCONFIG_H="<udfconfig.h>" unstveloc.cError: unstveloc.c: line 1: parse error. what should i do?please help me. thanks.

Vinod Dhiman August 8, 2005 08:58

Re: udf compile error
 
Firstly, don't use cpp, use g++ or c++. I check it out, where is the problem, and let you know if there is any.

Vinod Dhiman

Vinod Dhiman August 8, 2005 09:53

Re: udf compile error
 
The mistake is in defining variables. Firstly define variable, then start program. You have to define real t before starting f_loop.

Vinod Dhiman

rawin August 8, 2005 13:58

Re: udf compile error
 
Hi vinod; I check it,but the error appears again.

Vinod Dhiman August 8, 2005 14:01

Re: udf compile error
 
Compile it after making the changes I told you. Define t out of the loop

Vinod Dhiman

Vinod Dhiman August 8, 2005 14:25

Re: udf compile error
 
Else send me your ID. I'll send you a file. Make sure you have udf.h file in the same directory where you .c file is.

Vinod Dhiman

rawin August 9, 2005 05:40

Re: udf compile error
 
After making the changes you told,I compiled it. But it didn't solve the problem. rawin.

Vinod Dhiman August 9, 2005 07:19

Re: udf compile error
 
Is it still giving the same error. You send me your ID. I'll send you the file.

Vinod Dhiman

rawin August 9, 2005 10:29

Re: udf compile error
 
ok the same error. my ID:rawin_ch@yahoo.com

rawin August 15, 2005 05:29

Re: udf compile error
 
Hi vinod. I solved the problem I Was reading Fluent 6.0.12 .cas file to Fluent 6.018.


All times are GMT -4. The time now is 03:13.