|
[Sponsors] |
May 5, 2012, 07:41 |
udf problem
|
#1 |
New Member
hilla tor
Join Date: Jun 2009
Posts: 10
Rep Power: 17 |
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)} where i need to declared this variable? thanks for the help hilla |
|
May 5, 2012, 08:24 |
|
#2 |
New Member
hilla tor
Join Date: Jun 2009
Posts: 10
Rep Power: 17 |
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)} |
|
May 5, 2012, 10:10 |
|
#3 |
Senior Member
duri
Join Date: May 2010
Posts: 245
Rep Power: 17 |
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.
|
|
|
|
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 |