# udf problem

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

 May 5, 2012, 06:41 udf problem #1 New Member   hilla tor Join Date: Jun 2009 Posts: 10 Rep Power: 10 i try to write a udf that detemenie the bondury condithions and u and v (x y vilocities) how can i do it? i wrote the folloing file: Code: ```/********************************************************************** unsteady.c UDF for specifying a transient velocity profile boundary condition ***********************************************************************/ #include"udf.h" DEFINE_PROFILE(unsteady_velocity, thread, position) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f, thread, position) = -0.06*y*y+0.06*y; F_PROFILE1(f, thread, position)=-1; } end_f_loop(f, thread)} ``` and it written to me: F_PROFILE1: undeclared variable where i need to declared this variable? thanks for the help hilla

 May 5, 2012, 07:24 #2 New Member   hilla tor Join Date: Jun 2009 Posts: 10 Rep Power: 10 when i try to write it that way: Code: ```　 /********************************************************************** unsteady.c UDF for specifying a transient velocity profile boundary condition ***********************************************************************/ #include"udf.h" DEFINE_PROFILE(unsteady_velocity, thread, position) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f, thread, position) = -0.06*y*y+0.06*y; } end_f_loop(f, thread)} DEFINE_PROFILE_y(unsteady_velocity_y, thread, position) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[1]; F_PROFILE_y(f, thread, position) = -1; } end_f_loop(f, thread)} ``` it's write to me "syntax error"

 May 5, 2012, 09:10 #3 Senior Member   duri Join Date: May 2010 Posts: 160 Rep Power: 9 DEFINE_PROFILE and F_PROFILE are predefined macros, you cannot change as you wish. If you need a new profile change the first argument of DEFINE_PROFILE and hook it appropriately.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Rizwan Fluent UDF and Scheme Programming 39 June 29, 2017 19:04 july Fluent UDF and Scheme Programming 3 June 20, 2010 06:56 mansha goraya FLUENT 0 October 29, 2007 01:31 akr FLUENT 3 August 22, 2007 07:14 chiseung FLUENT 4 January 10, 2002 10:58

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