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

UDF syntax error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 11, 2002, 09:32
Default UDF syntax error
  #1
Duc
Guest
 
Posts: n/a
Hello, I am new at using UDF in Fluent, as a result, I tried create a UDF for unsteady flow, as described in the user manual. For some reason, when I try to interpret the function, it keep coming up with

Line 2: Syntax error

Can anyone suggest what I'm doing wrong? thanks in advance.

Duc ------

#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) = 42.41*cos(9424.778*t);

}

end_f_loop(f, thread) }

  Reply With Quote

Old   June 11, 2002, 10:03
Default Re: UDF syntax error
  #2
Ale
Guest
 
Posts: n/a
You probably simply need to insert a return before DEFINE_PROFILE:

#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) = 42.41*cos(9424.778*t);

}

end_f_loop(f, thread) }

I did it and I interpreted your code without any error message by FLUENT. I hope this can help you; anyway, I think it could depend on the C compiler you use.

Good luck, Ale
  Reply With Quote

Old   June 11, 2002, 10:27
Default Re: UDF syntax error
  #3
Duc
Guest
 
Posts: n/a
It may be something to do with my settings, as I've used the code you wrote without sucess. Just so strange. thanks for you help.
  Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile calcMassFlowC aurore OpenFOAM Programming & Development 13 March 23, 2018 08:43
[OpenFOAM] Native ParaView Reader Bugs tj22 ParaView 270 January 4, 2016 12:39
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 19:00
UDF: DEFINE_CG_MOTION for vertical jump motion of an electrode! alban Fluent UDF and Scheme Programming 2 June 8, 2010 19:54
Why udf can not be compiled in my pc? Xinqiang FLUENT 0 June 10, 2009 15:32


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