# A sample UDF in Fluent Documenation

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

 April 8, 2003, 21:03 A sample UDF in Fluent Documenation #1 majestywzh Guest   Posts: n/a #include "udf.h" DEFINE_PROFILE(pressure_profile, t, i) { real x[ND_ND];/* this will hold the position vector*/ real y; face_t f; begin_f_loop(f, t) { F_CENTROID(x,f,t); y = x[1]; F_PROFILE(f, t, i) = 1.1e5 - y*y/(.0745*.0745)*0.1e5; } end_f_loop(f, t) } 1.I'd like to know what is mean of"ND_ND"in the declare real x[ND_ND]. 2."y = x[1]"returns the y component of cell centroid positioin,but how about the x component and z component?

 April 8, 2003, 22:44 Re: A sample UDF in Fluent Documenation #2 Alex Munoz Guest   Posts: n/a hi Majestic friend the real x [Nd Nd] give you the node coordinates the second question the centroids is an array of three float values that according with c programming the array start on 0 for the first value and finist on 2 for the thhird value x=x[0] y=x[1] z=x[2] Regards Alex

 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 Avin2407 Fluent UDF and Scheme Programming 1 March 13, 2015 03:02 skris2009 FLUENT 2 September 19, 2011 23:59 gracerlima Fluent UDF and Scheme Programming 1 May 4, 2010 07:19 Rick FLUENT 0 May 7, 2008 10:16 huang peng FLUENT 2 February 25, 2007 15:58

All times are GMT -4. The time now is 01:58.