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

UDF parse error

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2009, 20:45
Default UDF parse error
  #1
New Member
 
Alejandra
Join Date: Mar 2009
Posts: 17
Rep Power: 17
alemenchaca is on a distinguished road
Hi,

I'm trying to interpret this function to use it as a velocity profile as boundary condition for an inlet.

I'm pretty sure the error is obvious, but I'm not quite familiar with c, and this is my first UDF.

I get the following parse error:

************
cpp -I"C:\PROGRA~1\ANSYSI~1\v120\fluent\fluent12.0.1 6/src" -I"C:\PROGRA~1\ANSYSI~1\v120\fluent\fluent12.0.1 6/cortex/src" -I"C:\PROGRA~1\ANSYSI~1\v120\fluent\fluent12.0.1 6/client/src" -I"C:\PROGRA~1\ANSYSI~1\v120\fluent\fluent12.0.1 6/multiport/src" -I. -
UDFCONFIG_H="<udfconfig.h>" "C:\Documents and Settings\Alejandra\Desktop\Fluent\Vel_prof.c"
Error: C:\Documents and Settings\Alejandra\Desktop\Fluent\Vel_prof.c: line 24: parse error.
*************

(the code ends on line 23)

**************
#include "udf.h"

DEFINE_PROFILE(z_inlet_velocity,thread,position)

{

real x[ND_ND];
real y;
real xx;
face_t f;

begin_f_loop(f,thread)

{

F_CENTROID(x,f,thread);
F_PROFILE(f, thread, position) = 0.631 * exp(-(pow(x[1],2.0) + pow(x[0], 2.0))/ pow(0.22, 2.0));

}

end_f_loop(f,thread)

}

***************
alemenchaca is offline   Reply With Quote

Reply

Tags
boundary condition, profile, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
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 19:54
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 03:32
Compiling problems with hello worldC fw407 OpenFOAM Installation 21 January 6, 2008 18:38
udf parse error brusly FLUENT 0 February 4, 2007 23:15
UDF: Parse error line 3 CJ FLUENT 2 March 1, 2005 11:12


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