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

udf problem

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 5, 2012, 06:41
Question udf problem
  #1
New Member
 
hilla tor
Join Date: Jun 2009
Posts: 10
Rep Power: 7
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, 07:24
Default
  #2
New Member
 
hilla tor
Join Date: Jun 2009
Posts: 10
Rep Power: 7
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, 09:10
Default
  #3
Senior Member
 
duri
Join Date: May 2010
Posts: 130
Rep Power: 6
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

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
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 30 March 21, 2014 06:34
Problem with my udf july Fluent UDF and Scheme Programming 3 June 20, 2010 06:56
UDF problem mansha goraya FLUENT 0 October 29, 2007 01:31
udf compiling problem akr FLUENT 3 August 22, 2007 07:14
UDF problem chiseung FLUENT 4 January 10, 2002 09:58


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