CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

udf compile error

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 8, 2005, 03:31
Default udf compile error
  #1
rawin
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   August 8, 2005, 08:58
Default Re: udf compile error
  #2
Vinod Dhiman
Guest
 
Posts: n/a
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
  Reply With Quote

Old   August 8, 2005, 09:53
Default Re: udf compile error
  #3
Vinod Dhiman
Guest
 
Posts: n/a
The mistake is in defining variables. Firstly define variable, then start program. You have to define real t before starting f_loop.

Vinod Dhiman
  Reply With Quote

Old   August 8, 2005, 13:58
Default Re: udf compile error
  #4
rawin
Guest
 
Posts: n/a
Hi vinod; I check it,but the error appears again.
  Reply With Quote

Old   August 8, 2005, 14:01
Default Re: udf compile error
  #5
Vinod Dhiman
Guest
 
Posts: n/a
Compile it after making the changes I told you. Define t out of the loop

Vinod Dhiman
  Reply With Quote

Old   August 8, 2005, 14:25
Default Re: udf compile error
  #6
Vinod Dhiman
Guest
 
Posts: n/a
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
  Reply With Quote

Old   August 9, 2005, 05:40
Default Re: udf compile error
  #7
rawin
Guest
 
Posts: n/a
After making the changes you told,I compiled it. But it didn't solve the problem. rawin.
  Reply With Quote

Old   August 9, 2005, 07:19
Default Re: udf compile error
  #8
Vinod Dhiman
Guest
 
Posts: n/a
Is it still giving the same error. You send me your ID. I'll send you the file.

Vinod Dhiman
  Reply With Quote

Old   August 9, 2005, 10:29
Default Re: udf compile error
  #9
rawin
Guest
 
Posts: n/a
ok the same error. my ID:rawin_ch@yahoo.com
  Reply With Quote

Old   August 15, 2005, 05:29
Default Re: udf compile error
  #10
rawin
Guest
 
Posts: n/a
Hi vinod. I solved the problem I Was reading Fluent 6.0.12 .cas file to Fluent 6.018.
  Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF: DEFINE_CG_MOTION for vertical jump motion of an electrode! alban Fluent UDF and Scheme Programming 2 June 8, 2010 18:54
compile errors of boundary condition "expDirectionMixed" liying02ts OpenFOAM Bugs 2 February 1, 2010 21:11
Installation of Netgen in SuSE Linux 92 edvardsenpriv Open Source Meshers: Gmsh, Netgen, CGNS, ... 23 January 16, 2009 07:12
How to get the max value of the whole field waynezw0618 OpenFOAM Running, Solving & CFD 4 June 17, 2008 05:07
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


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