CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

udf velocity profile

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

LinkBack Thread Tools Display Modes
Old   May 20, 2013, 14:46
Unhappy udf velocity profile
New Member
hilla tor
Join Date: Nov 2012
Posts: 22
Rep Power: 5
hillat is on a distinguished road
hi I am trying to write a udf function that use the index number in order to put a value from array. I wrote the following function that isn't working

DEFINE_PROFILE(unsteady_velocity, thread, position) { real x[ND_ND]; /* this will hold the position vector */ real y;real A[251]={8,7,6,5,4,3,2,1}; real t = CURRENT_TIME; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); c0 = F_C0(f,thread); y = x[1]*2000; F_PROFILE(f, thread, position) =A[c0];} end_f_loop(f, thread)}

for example the first y , index=1 so u=A[1]=8;

thanks for the help
hillat is offline   Reply With Quote


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
UDF problems - velocity profile Oli Fluent UDF and Scheme Programming 4 September 30, 2013 15:39
Velocity profile UDF egge24 Fluent UDF and Scheme Programming 2 May 10, 2012 13:03
Logarithmic velocity profile cfdworker Fluent UDF and Scheme Programming 0 April 23, 2009 19:09
How to specify the Velocity profile (eqn) by UDF Anant FLUENT 1 February 27, 2008 15:54
Multi step transient UDF velocity profile problem William177 FLUENT 1 February 3, 2008 07:47

All times are GMT -4. The time now is 02:35.