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

udf problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 5, 2012, 07:41
Question udf problem
  #1
New Member
 
hilla tor
Join Date: Jun 2009
Posts: 10
Rep Power: 17
hillator is on a distinguished road
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
hillator is offline   Reply With Quote

Old   May 5, 2012, 08:24
Default
  #2
New Member
 
hilla tor
Join Date: Jun 2009
Posts: 10
Rep Power: 17
hillator is on a distinguished road
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"
hillator is offline   Reply With Quote

Old   May 5, 2012, 10:10
Default
  #3
Senior Member
 
duri
Join Date: May 2010
Posts: 245
Rep Power: 17
duri is on a distinguished road
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.
duri is offline   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
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 March 18, 2018 07:05
Problem with my udf july Fluent UDF and Scheme Programming 3 June 20, 2010 07:56
UDF problem mansha goraya FLUENT 0 October 29, 2007 01:31
udf compiling problem akr FLUENT 3 August 22, 2007 08:14
UDF problem chiseung FLUENT 4 January 10, 2002 10:58


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